Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import remaining blog posts from the labs repository. #43 #49

Merged
merged 8 commits into from
Mar 27, 2019
Merged

import remaining blog posts from the labs repository. #43 #49

merged 8 commits into from
Mar 27, 2019

Conversation

makkoncept
Copy link
Member

@makkoncept makkoncept commented Mar 25, 2019

Description

I have used this python script to automate the conversion of HTML files(in _posts) to corresponding directories with contents.lr file inside. The script looks for the images referenced in HTML files in img directory and copies them to the folder. The files whose images were not find are printed to the console so that we can check manually in other places. Two markdown files were remaining which were ported manually.

Images corresponding to the following html files are not available:

  • _posts/2012-02-22-cc-legaleratta-errata-annotations-without-republishing-licenses.html
  • _posts/2007-05-01-stuffit-10-considered-harmful.html
  • _posts/2007-08-03-licensing-on-the-gnome-desktop.html
  • _posts/2007-08-03-licensing-on-the-gnome-desktop.html
  • _posts/2007-08-03-licensing-on-the-gnome-desktop.html
  • _posts/2007-05-04-palimpsest.html
  • _posts/2007-06-21-enhanced-metadata-graduates-from-labs.html
  • _posts/2010-07-11-gsoc-firefox-extension-status-report.html
  • _posts/2011-06-27-powerofopen-metrics.html
  • _posts/2007-06-27-its-coming-cc-openofficeorg-add-in.html
  • _posts/2007-06-27-its-coming-cc-openofficeorg-add-in.html

Other information

Checklist:

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the master branch of the repository.
  • My commit messages follow best practices.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

@makkoncept makkoncept requested a review from a team March 25, 2019 19:00
Copy link
Member

@kgodey kgodey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Could you replace (http://creativecommons.github.io/tech-blog-archives/more-xmp-toolkit-plugs/) style links with just (/tech-blog-archives/more-xmp-toolkit-plugs/)? the domain and protocol do not need to be in links within the same site.
  • Could you put the method you used to ensure that all blog posts and images were ported over in the PR description?

@kgodey
Copy link
Member

kgodey commented Mar 25, 2019

Also, has the blog-post.ini model been updated with the new field for categories? I can't find it in the diff but GitHub also isn't loading all files since it's so big.

@makkoncept
Copy link
Member Author

No, I thought I would do that after the draft PR would merge.

Just to confirm adding the following would do?

[fields.categories]
label = Categories
type = checkboxes

@kgodey
Copy link
Member

kgodey commented Mar 25, 2019

I would use strings as the type since checkboxes needs to have a fixed list of options. strings would require each category to be on a separate line though.
https://www.getlektor.com/docs/api/db/types/strings/

@makkoncept
Copy link
Member Author

category need to be on a separate line in <post_name>/content.lr for string type?

@kgodey
Copy link
Member

kgodey commented Mar 25, 2019

I believe so, I haven't used it before and I'm going off the documentation I linked above.

@makkoncept
Copy link
Member Author

I can make a script to do it.
Just to clarify, the format must be:

title: 32 to 64 bit remotely
---
categories: 
Debian
software
---
author: nkinkade
---

@kgodey
Copy link
Member

kgodey commented Mar 25, 2019

Yeah, that looks right. You could test it by trying to read the values in the template like the documentation shows.

@makkoncept
Copy link
Member Author

yes, I have tested it using the Lektor documentation example and it is working.
I will make the script to automate this.

@makkoncept
Copy link
Member Author

@kgodey I have done it. Please check the files.
Here is the script for reference.

@@ -1,6 +1,7 @@
title: Getting started with hacking on The List
---
author: Matt Lee
categories:
Lee
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some kind of error in the script. This post should have "development" as a category and nothing else (see: original file: https://raw.githubusercontent.com/creativecommons/labs/gh-pages/_posts/2014-12-15-getting-started-hacking-on-the-list.md)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only file with this error. I forgot to add the categories to it after it was merged in #43 and therefore the script not worked properly on it. I will correct it.

…-started-with-hacking-on-the-list/contents.lr
@kgodey
Copy link
Member

kgodey commented Mar 27, 2019

this looks good, I've verified with @makkoncept on Slack that the number of blog posts ported over match up.

@kgodey kgodey merged commit 427452e into creativecommons:master Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants