Coder Social home page Coder Social logo

confluencedumpwithpython's People

Contributors

dernorberto avatar itskaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

robws mmbe itskaa

confluencedumpwithpython's Issues

Adjust .rst output to match the syntax used by sphinxPageProperties

  • don't use .. meta
  • use field names instead
  • define a naming convention for the fields
:doc_owner: Norberto Soares
:doc_title: Critical Technology Usage Policy
:doc_author: Norberto Soares
:doc_labels: child, security-policy, status-active
:last_changed: 12.04.2023
:doc_status: IN EFFECT
:doc_version: 1.8
:doc_lang: English
:conf_pagetype: reportChild
:conf_pageid: 100892722
:conf_parent: 78872710

Attachment files with long filenames or unsupported characters

Issue

  • Error when exporting a PDF with pandoc
! Package pdftex.def Error: File `/private/var/folders/jm/76v60lk51sb3_cvn2kpzb
sch0000gr/T/tex2pdf.-f81a8d7c883e45e2/attachments/2021-07-28 14_18_57-Statuspag
e - New realtime incident and 10 more pages - Work - Microsofthspace {0pt} Edge
.png' not found: using draft setting.

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.849 ... - Work - Microsoft\hspace{0pt} Edge.png}
  • filename: 2021-07-28 14_18_57-Statuspage - New realtime incident and 10 more pages - Work - Microsoft​ Edge

Solution

  • sanitise attachments, probably name all attachments based on pagename and an index nr.

Non-image Attachments are dowloaded but the link is not updated

example pageID: 716701697

HTML:
<a href="https://optile.atlassian.net/wiki/download/attachments/716701697/File.docx?version=1&amp;modificationDate=1540461757616&amp;cacheVersion=1&amp;api=v2" rel="nofollow">
translates to RST:
- File.docx https://optile.atlassian.net/wiki/download/attachments/716701697/File.docx?version=1&modificationDate=1540461757616&cacheVersion=1&api=v2__ (attached)

cause:

  • the HTML is a simple <a href=...> without a class

Unify all possibilities into one .py file

Issue

  • when updating/fixing a feature from either script (single/pageproperties/bylabel), I need to manually update the other ones.

solution

  • unify all possibilities into one single .py file, reutilizing as much code as possible

Go through all .rst files and update links to pages with local ones

Once a Space or a set of .rst files have been downloaded, a script should go through them:

  1. collect the page IDs (it's a field value) for ALL available .rst files
  2. go through each .rst file, and for every link with the format https://optile.atlassian.net/wiki/spaces/SECOPS/pages/$pagenum ($pagenum being the page ID of the page), replace it with the local link

PagePropertiesReport: Report HTML takes the title and original URL from the last child page

Expected:

  • Report file: Security Policies.html
  • Report Title: Security Policies
  • last child file: Time Synchronisation Policy.html

Result:

  • Report Page Source:

<head>
--
  | <title>Time Synchronisation Policy</title>
  | <link rel="stylesheet" href="styles/site.css" type="text/css" />
  | <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  | </head>
  | <h2>Time Synchronisation Policy</h2>
  | <p>Original URL: <a href="https://optile.atlassian.net/wiki/spaces/SECOPS/pages/87490599/Time+Synchronisation+Policy"> Time Synchronisation Policy</a><hr>
  | <p>

<head>
        <title>Time Synchronisation Policy</title>
        <link rel="stylesheet" href="[styles/site.css](https://github.com/dernorberto/confluenceDumpWithPython/issues/styles/site.css)" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <h2>Time Synchronisation Policy</h2>
    <p>Original URL: <a href="https://optile.atlassian.net/wiki/spaces/SECOPS/pages/87490599/Time+Synchronisation+Policy"> Time Synchronisation Policy</a><hr>
    <p>```

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.