Git Product home page Git Product logo

confluence-page-copier's Introduction

Confluence page copier

Python script for creating a copy of a tree of Confluence pages.

Description

This script will help you to create duplicates of Confluence pages and their children. By default script will create a copy of page, labels and attachments. Default title of copied page would be "{title} ({counter})" -- that means that would be used title of original page and counter will be set to size+1 from number of pages with original title. Counter calculated only once for root page, so all descendats will have same number in title. You can set arbitrary title from command line and set prefixes/suffixes for new pages.

Also it's a good idea firstly use --dry-run flag which prevent any creations of new pages, so you can safely run script and examine it's output.

If you don't need to copy page's children, you can set --recursion-limit parameter to 0. Obviously, you can use this parameter to control recursion limit of children pages that you wish to copy.x

Examples

python copier.py --src-space=SPACE --src-title="Simple Page" --dst-title-template="Prefix {title} Suffix"

This command will create recursive copy of all pages starting from "Simple Page". Resulting pages will have name corresponding to template, e.g.: "Prefix Simple Page Suffix". If the same pages already exists script will throw an error. If you wish you can use --overwrite flag to overwrite existing page.

python copier.py --src-id=12345 --dst-title-template="{title} ({counter})"

This command will create a copy of page with id 12345 and add a counter to the title of copied page. This way you can create multiple copies without warring about conflicts in names.

Similar software

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.