GithubHelp home page GithubHelp logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Created a clone https://code.google.com/r/gbtami-googlecode2bitbucket/
It converts attachments and updates to logs. (The code contains some PyChess 
specific labels and milestones.)

Original comment by gbtami on 27 Jan 2015 at 8:37

from support-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Attached is a patch (download_support.patch) created at revision 8ac29fcfa 
based on the changes from comment #1 and including the following enhancements:

- Fix the project download URL (all project URLs have the form 
https://code.google.com/p/...).
- Don't re-download an attachment if it already exists in the attachments path.
- Also unescape "&" in FixUpComment.
- Remove PyChess-specific logic.

Also attached is the example of converting an issue from Google Code to 
Bitbucket:
example_google_code.pdf = Original issue.
example_bitbucket.pdf = Bitbucket import including the changes from this patch.

One additional nice-to-have feature would be better formatting [1] in 
FixUpComment for comments that include code snippets or call stacks. The 
default Markdown formatting for these is usually quite bad, including breaking 
other Markdown syntax if the comment code brackets (`{}`) are unmatched (see 
comments #1 and #4 in the example pdf for examples of bad formatting).

Also, it should be noted that the target attachments folder (passed via 
--attachments_path=<path>) needs to be relative to the db-1.0.json file 
location and included in the zip archive uploaded in Bitbucket.

[1] 
https://bitbucket.org/tutorials/markdowndemo/overview#markdown-header-code-and-s
yntax-highlighting

Original comment by [email protected] on 13 Mar 2015 at 10:54

Attachments:

from support-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Attached is an updated patch with a few more minor enhancements:

- Add a space after "@" to avoid user references.
- Escape "\", "`", "_", "*" and "#" which are otherwise treated as formatting. 
This makes python and C++ call stacks look decent.
- Map "done" and "verified" statuses to "resolved".

Original comment by [email protected] on 14 Mar 2015 at 2:48

Attachments:

from support-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
@magreenblatt, thank you for the patches. I'll try to merge them in as soon as 
I can.

Original comment by [email protected] on 14 Mar 2015 at 2:58

from support-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Thank for the patch. However, I get a 404 error when trying to download first 
attachement with gbtami cloned script and a "Failed to download..." message 
error with the above patch for all attachments. When directly  typing the 
address returned by the error log in a browser, the file is however accessible.

Could you tell me what I'm doing wrong and if I'm missing something to allow 
HTTP downloads from a python script (windows user here) ?

Original comment by [email protected] on 15 Mar 2015 at 6:18

from support-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
@comment#5: You'll get the "Failed to download..." error with the patch if the 
directory passed to `--attachments_path` does not already exist.

Original comment by [email protected] on 15 Mar 2015 at 7:02

from support-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Thanks for your answer.

The directory passed as parameter exists but it seems like the patch actually 
fails if the attachment file does not exist locally.

I fixed it by removing the following line:
if not os.path.exists(path):

At this step, path contains the full pathname for the file (attachments_path/ 
attachmentId) so I'm not sure if this intended behavior or a bug.

Original comment by [email protected] on 15 Mar 2015 at 7:28

from support-tools.

Related Issues (20)

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.