descent098 / ezcv Goto Github PK
View Code? Open in Web Editor NEWA python-based static site generator for setting up a CV/Resume site
Home Page: https://ezcv.readthedocs.io/en/latest/
License: MIT License
A python-based static site generator for setting up a CV/Resume site
Home Page: https://ezcv.readthedocs.io/en/latest/
License: MIT License
required_config:
avatar:
type: str
default: "https://example.com"
description: "This is a link to an avatar image"
This would mean when using the theme to init a project there will be the following parameters added to config.yml
... # Other code
avatar: "https://example.com" # This is a link to an avatar image
...
ezcv.core.generate_site()
before generatingezcv.cli.init()
when generating config.yml
ezcv theme -m
Create a new getting started video and add it to readme as well as update it on the main docs
<details>
)<details>
)The specifics section of the documentation is used to explain in plain english to contributors how data flows through ezcv and how the system is constructed
cli
content
core
filters
themes
Add notes to docs about config that another reserved word is made
generate_site()
methodname: evie
URL: https://onepagelove.com/evie
index.jijna
required: true
to fields that need itdocs/included-themes.md
remotes.yml
Add new CLI command
ezcv section -n <SECTION_NAME> [-t=<type>]
Options:
m
or markdown
: generate standard markdown sectionb
or blog
: Generate a blog
o
(overview), s
(single), f
(feed) for which you want to generate or don't include any to generate allg
or gallery
: generate a gallerySpeed up build time by keeping a cache of files and only updating ones that have been changed since last build.
build --clean
flag to ignore the cache and rebuild all filesimport os
import time
import datetime
last_updated_time = os.path.getmtime("example-current.md")
ctime_last_updated = time.ctime(last_updated_time )
datetime_last_updated = datetime.datetime.strptime(ctime_last_updated , "%a %b %d %H:%M:%S %Y")
i.e.
{
"templates":{
"index.jinja":"<hash here>"
},
"content":{
"folders":{
"education":{
"hash":"<hash here>",
"files":{
"example.md":"<hash here>"
}
}
}
}
}
Refactor the code base to use metadata in generation and simplify process for generating content.
ezcv.core.generate_site()
& ezcv.core.get_site_config
ezcv.filters
All functions in here, but importantly will need to support injecting custom filters (and document it)ezcv.content
/blog/my-post.html
)<section_name>_html
is set to ""
so templates can know if the html is available.Various pieces of information would be valuable to have in themes to make the usage less ambiguous. For example which content sections, which section fields etc. are allowed. There also needs to be 2 seperate specifications, the first is for themes in theme folders/remotes (theme configuration), and the second is for themes when they are copied into a directory using ezcv -c <theme>
(instance configuration).
init
on themename: dimension
ezcv_version: "0.3.0"
created: 2022-04-22
updated: 2022-04-22
folder: dimension # optional, only needed if folder is different than name field
sections: # optional (some themes have no sections)
education:
type: markdown
fields: # Optional
title: str
institution:
required: true
type: str
month_started: str
year_started: str
month_ended: str
year_ended: str
current: bool
gallery:
type: gallery
projects:
type: markdown
fields:
title:
required: true
type: str
image: image
link: str
volunteering_experience:
type: markdown
fields:
role:
required: true
type: str
company:
required: true
type: str
month_started: str
year_started: str
month_ended: str
year_ended: str
current: bool
work_experience:
type: markdown
fields:
role:
required: true
type: str
company:
required: true
type: str
month_started: str
year_started: str
month_ended: str
year_ended: str
current: bool
A regular string, but it must be in the format YYYY-MM-DD
, so for April 21st 2022 it would be 2022-04-21
You can define literals to state strings that must be one of a set number of options, for example if a field only be the strings "literal1" or "literal2" you can use a list format to denote this:
field_name:
- literal1
- literal2
So for example if you have the choice between the literals ["sophomore", "junior", "senior"] for the field level
it would be:
level:
- sophomore
- junior
- senior
For fields within a section there is a type specifier to note the type for a field in the form of:
... # More stuff
sections:
section_name:
...
fields
field_name: type
section_name2:
...
fields
field_name: type
... # More stuff
So if there is a field called current
in education
section files it would look like
... # More stuff
sections:
education:
...
fields
current: bool
... # More stuff
Type indicators are:
bool
: Boolean values (True or False)str
: string values (plain text)dstring
: datetime string (string in the format of YYYY-MM-DD
)literal
: literal (a set of strings see below for details)int
: an integer (number)float
: a floating point number (decimal number)For literals you can use the following format
... # More stuff
sections:
education:
... # More stuff
fields
level:
- sophmore
- junior
- senior
... # More stuff
If a field is required you can denote it by adding a required: true
key-value pair to the field, otherwise it is assumed to be optional. For example:
... # More stuff
sections:
section_name:
folder_name: str
fields:
field_name:
type: str
required: true
section_name2:
folder_name: str
fields:
field_name: type
... # More stuff
... # More stuff
sections:
section_name:
folder_name: str
fields:
field_name:
type: str
required: true
section_name2:
folder_name: str
fields:
field_name: type
... # More stuff
Any exceptions to the above spec are noted below
For the gallery since there is no additional fields only the folder_name
key is necessary/usable
... # More stuff
sections:
gallery:
folder_name: str
... # More stuff
Having every theme included in the default installation is going to become a problem as the amount of themes increases. Instead allow them to be looked up and downloaded on first use from a remote source (github repo).
Way to get summary data/taglines to use in feeds (filter with blog post passed in that returns a summary?)
Tagline/subtitle option
Image option
Way to specify featured posts
Structured data
RSA feed
Add tagging/tag-management system
Add Auto-pagination? (Maybe a js library with page-data stored) or global variable
Auto Search (Lunr.js)
Look into tagging/tag-management, and figure out a way to integrate that into the "overview" section
ezcv theme [-l] [-c] [-s SECTION_NAME] [<theme>]
-s SECTION_NAME, --section SECTION_NAME The section name to initialize
I Want to be able to have different types of blog posts that can be displayed in a custom way. i.e. recipies etc.
Add notes to docs about config that another reserved word is made
Include an example repo that has a flask webserver setup that generates a site and then uses flask as a webserver that points to the ezcv output.
/site
/site
Add a flag to the init
command to allow for a site to be generated with this config
init
optionBe able to specify
ezcv buiild -o
or ezcv build --optimize
This feature allows an optimized build of the site to be done, which will be faster for people who come to your site, but will take longer to build initially.
Minify images
Minify CSS and JS
Minify HTML?
Add blog support
Add docs about feature generally and what it does
Add docs mentioning this only works with themes following https://ezcv.readthedocs.io/en/latest/theme-development/#folder-layout
Add note to https://ezcv.readthedocs.io/en/latest/theme-development/#folder-layout that this layout is required to use the optimized flag on builds
Documentation about formatting
sequenceDiagram
participant content folder
participant template
participant output html
content folder->>template: Content is taken and parsed by template
template->>output html: template rendered by jinja into output html
pie title Wordpress market share
"wordpress" : 62
"Drupal" : 3
"squarespace" : 3
"shopify": 3
"everything else": 28
content.get_content_directories()
function explicitlyrequired_config
is not providedContent
types and adding filtersIt would be nice to be able to specify remote repo's for downloading themes from. This is useful so that anyone who has multiple custom themes can specify a lookup natively.
theme
field to also be the path to a url to a .zip
file remotely
user-remotes.yml
which is a seperate file specifically for new user remotes
user-remotes.yml
file i.e. ezcv theme -r="filename.yml"
or ezcv theme --remote="filename.yml"
orBelow are the purposed schemas for the blog section.
π<theme_name>/
βββ πcss/
| βββπ <file_name>.css
βββ πjs/
| βββπ <file_name>.js
βββ πimages/
| βββπ <file_name>.<extension>
βββ πsections/
| βββ πblog/
| βββ π overview.jinja
| βββπ single.jinja
| βββ π feed.jinja
| βββπ <section_name>.jinja
βββ πindex.jinja
βββ πcontent/
β βββ πblog/
β | βββ π<filename>.md
ezcv build
that they should upgrade if a new version is available
ezcv -l
and upgrades are available for local themesimport requests
import datetime
response = requests.get('https://api.github.com/repos/QU-UP/ezcv-themes/branches/main')
# print response
print(response)
# print json content
print(response.json()["commit"]["commit"]["author"]["date"])
print(datetime.datetime.strptime(response.json()["commit"]["commit"]["author"]["date"], "%Y-%m-
%dT%H:%M:%SZ").strftime("%Y-%m-%d")) # returns string of "Year-Month-Day"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.