├── src ├── config.yaml ├── assets │ ├── fonts │ │ ├── Hubot-Sans.woff2 │ │ └── Mona-Sans.woff2 │ └── css │ │ ├── fonts.css │ │ └── styles.css ├── pages │ ├── contact.md │ └── about.md ├── templates │ ├── page.html │ ├── home.html │ ├── layout.html │ └── resume.html └── resume │ ├── history │ ├── 2012-college.yaml │ ├── 2016-web-software.yaml │ ├── 2015-health-magazine.yaml │ ├── 2015-content-agency.yaml │ ├── 2012-blog-podcast.yaml │ ├── 2017-seo-services.yaml │ ├── 2012-health-center.yaml │ ├── 2012-freelance.yaml │ ├── 2018-entertainment-co.yaml │ ├── 2021-seo-inc.yaml │ └── 2013-mobile-solutions.yaml │ ├── about.yaml │ └── roles.yaml ├── requirements.txt ├── postcss.config.js ├── Pipfile ├── app ├── watch.py ├── server.py ├── load.py ├── build.py └── helpers.py ├── package.json ├── tailwind.config.js ├── .github └── workflows │ └── highlight-app.yml ├── main.py ├── .gitignore ├── README.md └── LICENSE /src/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | url: https://demo.highlight.dorko.dev 3 | avatar: github 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | jinja2 2 | markdown 3 | markupsafe 4 | pyyaml 5 | six 6 | unicode-slugify 7 | unidecode 8 | watchdog -------------------------------------------------------------------------------- /src/assets/fonts/Hubot-Sans.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/annedorko/highlight/HEAD/src/assets/fonts/Hubot-Sans.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/Mona-Sans.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/annedorko/highlight/HEAD/src/assets/fonts/Mona-Sans.woff2 -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | // postcss.config.js 2 | module.exports = { 3 | plugins: { 4 | 'postcss-import': {}, 5 | 'tailwindcss/nesting': {}, 6 | tailwindcss: {}, 7 | autoprefixer: {}, 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /src/pages/contact.md: -------------------------------------------------------------------------------- 1 | title: Contact this Awesome Person 2 | anchor: Contact 3 | order: 2 4 | 5 | 6 | # Let’s Work Together 7 | 8 | I am currently available for new contracts. Shoot me an email with your needs and let’s work something out: [yourname@example.com](mailto:yourname@example.com) 9 | -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.python.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | pyyaml = "*" 8 | unicode-slugify = "*" 9 | watchdog = "*" 10 | jinja2 = "*" 11 | markdown = "*" 12 | 13 | [dev-packages] 14 | 15 | [requires] 16 | python_version = "3.8" 17 | -------------------------------------------------------------------------------- /src/templates/page.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 | 4 |
5 |
6 |
7 | {{ page }} 8 |
9 |
10 |
11 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /app/watch.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | # Function to handle Ctrl+C 4 | def signal_handler(sig, frame, server=None, observer=None): 5 | print('Shutting down Highlight server...') 6 | if observer: 7 | print('Closing file watcher...') 8 | observer.stop() 9 | observer.join() 10 | if server: 11 | print('Closing server...') 12 | server.httpd().server_close() 13 | print('Highlight shut down.') 14 | os._exit(0) 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "install-pip": "pip install -r requirements.txt", 4 | "install-pipenv": "pipenv install", 5 | "install-conda": "conda install --file requirements.txt", 6 | "build": "python3 main.py build", 7 | "develop": "python3 main.py server --watch", 8 | "server": "python3 main.py server" 9 | }, 10 | "devDependencies": { 11 | "autoprefixer": "^10.4.16", 12 | "postcss-cli": "^10.1.0", 13 | "postcss-import": "^15.1.0", 14 | "tailwindcss": "^3.3.5" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/resume/history/2012-college.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | exclude: 5 | - Graphic Designer 6 | titles: 7 | default: PHP & JavaScript Instructor 8 | company: College 9 | location: City, State, USA 10 | url: https://www.example.com 11 | type: Full-time 12 | dates: 13 | start: 2012-11 14 | end: 2013-05 15 | skills: 16 | base: 17 | - PHP 18 | - JavaScript 19 | default: 20 | - Photoshop 21 | descriptions: 22 | default: Designed educational materials and taught art students to make the leap from graphic design to programming with PHP and JavaScript. 23 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | const defaultTheme = require('tailwindcss/defaultTheme'); 3 | 4 | module.exports = { 5 | content: ['site/**/*.html', 'templates/**/*.html', 'pages/**/*.md'], 6 | theme: { 7 | fontFamily: { 8 | sans: ["'Mona Sans'", ...defaultTheme.fontFamily.sans], 9 | headline: ["'Hubot Sans'", ...defaultTheme.fontFamily.sans], 10 | }, 11 | extend: { 12 | screens: { 13 | print: { raw: 'print' }, 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | }; 19 | -------------------------------------------------------------------------------- /src/assets/css/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Mona Sans'; 3 | src: url('../fonts/Mona-Sans.woff2') format('woff2 supports variations'), 4 | url('../fonts/Mona-Sans.woff2') format('woff2-variations'); 5 | font-weight: 200 900; 6 | font-stretch: 75% 125%; 7 | font-display: swap; 8 | } 9 | @font-face { 10 | font-family: 'Hubot Sans'; 11 | src: url('../fonts/Hubot-Sans.woff2') format('woff2 supports variations'), 12 | url('../fonts/Hubot-Sans.woff2') format('woff2-variations'); 13 | font-weight: 200 900; 14 | font-stretch: 75% 125%; 15 | font-display: swap; 16 | } 17 | -------------------------------------------------------------------------------- /src/resume/history/2016-web-software.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | titles: 5 | default: Software Engineer 6 | Graphic Designer: Web Template Designer 7 | company: Web Software, Inc. 8 | location: City, State, USA 9 | url: https://www.example.com/ 10 | type: Full-time 11 | dates: 12 | start: 2016-06 13 | end: 2016-12 14 | skills: 15 | base: 16 | - PHP 17 | default: 18 | - Photoshop 19 | descriptions: 20 | default: Identified client needs for custom web development projects. Identified internal needs and developed custom PHP scripts to improve product performance. Identified and designed necessary graphics for internal communications and external marketing. 21 | -------------------------------------------------------------------------------- /src/resume/history/2015-health-magazine.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | titles: 5 | default: Web Coordinator 6 | Graphic Designer: UX/UI Designer 7 | company: Health Magazine 8 | location: City, State, USA 9 | url: https://www.example.com/ 10 | type: Full-time 11 | dates: 12 | start: 2015-10 13 | end: 2016-06 14 | skills: 15 | base: 16 | - Web Design 17 | - WordPress 18 | default: 19 | - Photoshop 20 | descriptions: 21 | default: Identified opportunities for improved performance on the front-facing website. Designed and implemented necessary marketing graphics. UX and UI testing and design, implemented custom development solutions to improve visual data results when searching for restaurants or dishes. 22 | -------------------------------------------------------------------------------- /src/resume/history/2015-content-agency.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | exclude: 5 | - Graphic Designer 6 | titles: 7 | default: WordPress Tutorial Writer 8 | company: Writing Agency 9 | location: Remote 10 | url: https://www.example.com 11 | type: Freelance 12 | dates: 13 | start: 2015-11 14 | end: 2018-01 15 | skills: 16 | base: 17 | - Writing 18 | default: 19 | - SEO 20 | descriptions: 21 | default: Ghost-writer for technical articles focusing on teaching nontechnical readers how to work with WordPress. 22 | Online Marketer: Researched keyword opportunities for content marketing material. Wrote keyword optimized articles and tutorials on technical topics for non-technical consumers. Sourced and optimized media to improve reader experience. 23 | -------------------------------------------------------------------------------- /src/resume/history/2012-blog-podcast.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - Graphic Designer 4 | - Online Marketer 5 | titles: 6 | default: Founder 7 | Graphic Designer: Web Designer 8 | Online Marketer: Copywriter 9 | company: Collaborative Podcast 10 | location: Remote 11 | url: https://www.withoutboxes.com/ 12 | type: Project 13 | dates: 14 | start: 2012-05 15 | end: 2019-08 16 | skills: 17 | base: 18 | - Writing 19 | default: 20 | - Podcast Production 21 | descriptions: 22 | default: "Coordinate and produce a seasonal interview podcast with a co-founder: Locating interview candidates, preparing discovery questions, writing unique interviews, writing summaries, and publishing final episodes. Website design, management, and optimization. SEO updates for evergreen content." 23 | -------------------------------------------------------------------------------- /src/resume/history/2017-seo-services.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - Online Marketer 4 | titles: 5 | default: Creator 6 | Online Marketer: Research and Copywriting 7 | company: SEO Services 8 | location: Remote 9 | url: https://www.example.com 10 | type: Project 11 | dates: 12 | start: 2017-07 13 | end: 2018-03 14 | skills: 15 | base: 16 | - SEO 17 | default: 18 | - PHP 19 | descriptions: 20 | default: Identified significant gaps in the SEO market and created a solution to help DIY website owners take simple steps to maximize exposure and increase online traffic for qualified customers. Content and brand is managed by WooRank as of March 2018. 21 | Online Marketer: Identified significant gaps in the SEO market. Write educational materials to help DIY website owners learn SEO. Content and brand is managed by WooRank as of March 2018. 22 | -------------------------------------------------------------------------------- /.github/workflows/highlight-app.yml: -------------------------------------------------------------------------------- 1 | name: Highlight Github Pages Deployment 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: Set up Python 17 | uses: actions/setup-python@v4 18 | with: 19 | python-version: "3.x" 20 | - name: Set up Node.js 21 | uses: actions/setup-node@v3 22 | with: 23 | node-version: "21.x" 24 | - run: npm run install-pip 25 | - run: npm ci 26 | - run: npm run build --if-present 27 | - name: Deploy 28 | uses: peaceiris/actions-gh-pages@v3 29 | if: ${{ github.ref == 'refs/heads/main' }} 30 | with: 31 | github_token: ${{ secrets.GITHUB_TOKEN }} 32 | publish_dir: ./site 33 | -------------------------------------------------------------------------------- /src/assets/css/styles.css: -------------------------------------------------------------------------------- 1 | /* ./src/tailwind.css */ 2 | @import "./fonts.css"; 3 | @tailwind base; 4 | @tailwind components; 5 | @tailwind utilities; 6 | h1, 7 | h2, 8 | h3, 9 | h4, 10 | h5, 11 | h6 { 12 | @apply font-headline font-normal; 13 | } 14 | .profile h4 { 15 | @apply font-headline tracking-tight font-bold; 16 | } 17 | .page h1 { 18 | @apply text-center; 19 | } 20 | .btn { 21 | @apply px-4 py-2 bg-blue-600 text-white rounded; 22 | } 23 | .prose { 24 | h1, 25 | h2, 26 | h3, 27 | h4, 28 | h5, 29 | h6 { 30 | @apply font-bold mb-5; 31 | } 32 | h1 { 33 | @apply text-4xl; 34 | } 35 | h2 { 36 | @apply text-3xl; 37 | } 38 | h3 { 39 | @apply text-2xl; 40 | } 41 | h4 { 42 | @apply text-xl; 43 | } 44 | > * { 45 | @apply max-w-xl mx-auto; 46 | } 47 | p { 48 | @apply text-lg mb-3; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resume/history/2012-health-center.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | titles: 5 | default: Search Engine Marketer 6 | Front End Developer: Web Manager 7 | Graphic Designer: In-House Graphic Designer 8 | company: Health Center Inc. 9 | location: City, State, USA 10 | url: https://www.example.com/ 11 | type: Full-time 12 | dates: 13 | start: 2012-04 14 | end: 2013-01 15 | skills: 16 | base: 17 | - Content Marketing 18 | - Search Engine Marketing 19 | default: 20 | - Keyword Research 21 | - Google Analytics 22 | - Google Ads Manager 23 | - Adobe InDesign 24 | - Adobe Photoshop 25 | Graphic Design: 26 | - Copy Writing 27 | - Graphic Design 28 | descriptions: 29 | default: Identified keyword opportunities, created keyword-focused content to generate business inquiries, maintained and optimized the website, designed magazine ads and internal marketing visuals. 30 | -------------------------------------------------------------------------------- /src/resume/history/2012-freelance.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | titles: 5 | default: Independent Contractor 6 | Front End Developer: Web Designer and Developer 7 | WordPress Developer: WordPress Designer and Developer 8 | Graphic Designer: Web and Graphic Design 9 | company: Self 10 | location: Remote 11 | url: https://www.example.com 12 | type: Freelance 13 | dates: 14 | start: 2012-01 15 | end: Present 16 | skills: 17 | base: 18 | - PHP 19 | - MySQL 20 | - Node.js 21 | default: 22 | - WordPress 23 | - DaVinci Resolve 24 | - Next.js 25 | - Gatsby.js 26 | Graphic Designer: 27 | - Adobe Creative Suite 28 | - Affinity Designer 29 | descriptions: 30 | default: Managing remote clients globally. Work including ad-hoc services, graphic, design, branding, WordPress plugin and theme development, general web development, data analysis, educational platform design, online marketing services, support, and consulting. 31 | -------------------------------------------------------------------------------- /src/resume/history/2018-entertainment-co.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | exclude: 5 | - Online Marketer 6 | titles: 7 | default: Creator 8 | company: Entertainment Co. 9 | location: Remote 10 | url: https://www.example.com 11 | type: Project 12 | dates: 13 | start: 2018-04 14 | end: Present 15 | skills: 16 | base: 17 | - Leadership 18 | - Community Management 19 | default: 20 | - Music Production 21 | Front End Developer: 22 | - Node.js 23 | - Discord.js 24 | descriptions: 25 | default: Entertainment platform for mental health advocacy through music, research-led conversation, and uplifting community spaces. Weekly live content planning and delivery. Creating and maintaining a custom self-hosted crowdfunding platform, including custom analytics solutions. 26 | Front End Developer: Developing custom Patreon-alternatives, custom Discord bots, and other scripts to facilitate community management. 27 | WordPress Developer: Developing custom Patreon-alternatives using WordPress, Divi, and Stripe, as well as custom Discord bots and other scripts to facilitate community management. 28 | -------------------------------------------------------------------------------- /src/resume/history/2021-seo-inc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | exclude: 5 | - Graphic Designer 6 | titles: 7 | default: Head of Education 8 | Front End Developer: Front End Developer 9 | WordPress Developer: WordPress Developer 10 | company: SEO, Inc. 11 | location: Remote 12 | url: https://www.example.com/ 13 | type: Freelance 14 | dates: 15 | start: 2021-03 16 | end: 2022-05 17 | skills: 18 | base: 19 | - SEO 20 | default: 21 | - PHP 22 | descriptions: 23 | default: Identified education opportunities in SEO. Integrated SEO Prompts content into existing marketing materials. Planned out the creation of a new educational program. Coordinated with the marketing team to create the contents of the educational product. Researched, designed, and developed the technical elements for the educational platform. 24 | Front End Developer: Designed and developed custom solutions for delivering a new educational program using WordPress with Divi. Worked closely with the marketing team. 25 | WordPress Developer: Designed and developed custom solutions for delivering a new educational program using WordPress, Divi, LearnDash, and WooCommerce. Worked closely with the marketing team. 26 | -------------------------------------------------------------------------------- /src/resume/history/2013-mobile-solutions.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - All 4 | titles: 5 | default: Web Developer 6 | Graphic Designer: In-House Graphic Designer 7 | company: Mobile Solutions, Inc. 8 | location: City, State, USA 9 | url: https://www.example.com 10 | type: Full-time 11 | dates: 12 | start: 2013-01 13 | end: 2015-04 14 | skills: 15 | base: 16 | - Ruby 17 | - HTML 18 | - CSS 19 | - JavaScript 20 | - Agile Methodologies 21 | default: 22 | - Ruby on Rails 23 | - Quality Assurance 24 | - Website Optimization 25 | Online Marketer: 26 | - Keyword Research 27 | descriptions: 28 | default: Created and improved UX and UI in an Agile work environment. Front-end development with Ruby on Rails. Designed and managed our front-facing business website. Communicated with engineers and business development teams to establish design goals. Tested bugs for Quality Assurance. Identified keyword opportunities and website optimization. 29 | WordPress Developer: Created and improved UX and UI in an Agile work environment. Managed front-end design and development. Communicated with engineers and business development teams to establish design goals. Tested bugs for Quality Assurance. Identified keyword opportunities and website optimization. 30 | -------------------------------------------------------------------------------- /src/pages/about.md: -------------------------------------------------------------------------------- 1 | title: About 2 | order: 0 3 | 4 | # What I Do! 5 | 6 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec est nulla, porttitor sed tellus eget, rhoncus porta quam. Quisque erat diam, venenatis nec tortor eu, fringilla rutrum magna. Integer lorem lorem, finibus a neque quis, dignissim varius elit. Vivamus nec feugiat leo. Donec mattis semper risus in ultricies. Fusce quis sem imperdiet, sodales ipsum sed, dignissim sem. Sed facilisis libero nec felis egestas consectetur. 7 | 8 | Vestibulum et nisi suscipit, iaculis nunc vitae, ullamcorper dui. Aenean non posuere nisl. Ut lacinia maximus iaculis. Mauris sollicitudin velit ac nulla suscipit tincidunt. 9 | 10 | ## About Me 11 | 12 | Nullam pellentesque tincidunt ipsum, at commodo arcu sollicitudin ac. 13 | 14 | Etiam varius orci vel sapien fermentum lacinia. Etiam vitae lorem vel nibh dictum suscipit. Curabitur auctor vitae massa ultrices interdum. Maecenas at viverra metus, quis pulvinar lacus. Donec tortor ligula, tristique ut risus rutrum, laoreet tempus ante. Pellentesque porttitor nibh sed placerat sagittis. Nam urna sapien, aliquet sed ipsum at, porta vulputate libero. Nam elementum, diam vel lobortis blandit, felis tortor porta lectus, sed pharetra ligula enim nec nunc. Sed ut felis sed augue posuere ullamcorper. Vestibulum sodales mauris eu pellentesque aliquet. Integer feugiat, dui ac dignissim luctus, nisi ante mattis metus, in congue diam leo vel tortor. -------------------------------------------------------------------------------- /app/server.py: -------------------------------------------------------------------------------- 1 | import os 2 | import socketserver 3 | from http.server import SimpleHTTPRequestHandler 4 | 5 | class SetDirectory(SimpleHTTPRequestHandler): 6 | def do_GET(self): 7 | # Serve from site/ directory 8 | self.path = 'site/' + self.path 9 | # Enable pretty urls 10 | f, ext = os.path.splitext(self.path) 11 | if ext == '': 12 | html_path = self.path + '.html' 13 | if os.path.isfile(html_path): 14 | self.path = html_path 15 | # Return file 16 | super().do_GET() 17 | 18 | 19 | class HighlightServer: 20 | def __init__(self): 21 | self.data = {} 22 | self.data['httpd'] = None 23 | 24 | def httpd(self): 25 | return self.data['httpd'] 26 | 27 | def run(self): 28 | handler = SetDirectory 29 | 30 | with socketserver.TCPServer(("localhost", 4242), handler) as httpd: 31 | self.data['httpd'] = httpd 32 | print("Serving at port 4242...") 33 | print('\n') 34 | print('http://localhost:4242') 35 | print('--------') 36 | httpd.serve_forever() 37 | 38 | try: 39 | # Serve forever until Ctrl+C is pressed 40 | httpd.serve_forever() 41 | except KeyboardInterrupt: 42 | # Handle Ctrl+C to ensure proper cleanup 43 | print("Server shutting down...") 44 | finally: 45 | # Close the server 46 | httpd.server_close() 47 | 48 | -------------------------------------------------------------------------------- /src/resume/about.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Your Name 3 | taglines: 4 | default: An epic tagline that highlights what you do on the whole. 5 | open: 6 | available: true 7 | seeking: Freelance & Contract 8 | location: Remote 9 | skills: 10 | Web & Marketing: 11 | - skill: Web design 12 | years: 10 13 | - skill: Web development 14 | years: 10 15 | - skill: SEO and traffic analytics 16 | years: 8 17 | - skill: Ads management 18 | years: 5 19 | - skill: Content marketing 20 | years: 5 21 | Multimedia: 22 | - skill: Graphic design 23 | years: 10 24 | - skill: Photography 25 | years: 12 26 | - skill: Film editing 27 | years: 8 28 | - skill: Podcast production 29 | years: 3 30 | links: 31 | Homepage: 32 | url: https://highlight.dorko.dev 33 | text: highlight.dorko.dev 34 | LinkedIn: 35 | url: https://www.linkedin.com/in/annedorko 36 | text: "LinkedIn" 37 | icon: '' 38 | contact: 39 | email: you@example.com 40 | phone: +1 555 321 5432 41 | timezone: CET/CEST 42 | github: annedorko 43 | education: 44 | MBA: 45 | school: Acme University 46 | degree: Masters 47 | study: Business Administration 48 | graduation: 2023 49 | B.S. Media Arts: 50 | school: Acme College 51 | degree: Bachelor of Science 52 | study: Media Arts 53 | graduation: 2015 54 | A.A. Graphic Design: 55 | school: Acme College 56 | degree: Associates 57 | study: Graphic Design 58 | graduation: 2014 59 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Highlight v 0.1.1 3 | 4 | Featuring a completely reworked server engine. 5 | 6 | Breaking changes: 7 | - Remove compile command, switch to build 8 | - Modernized TailwindCSS 9 | 10 | Features: 11 | - package.json scripts (requires python3 as a valid command line prompt) 12 | - Local fonts (Github's Mona and Hubot) 13 | - Reworked server and watch engine 14 | 15 | CREDITS 16 | Core server based on: https://blog.naveeraashraf.com/posts/make-static-site-generator-with-python-2/ 17 | ''' 18 | import sys 19 | import signal 20 | from watchdog.observers import Observer 21 | from watchdog.events import FileSystemEventHandler 22 | from app.build import GenerateSite 23 | from app.server import HighlightServer 24 | from app.watch import signal_handler 25 | from app.helpers import watch_paths 26 | 27 | if 'build' in sys.argv: 28 | # Generate site for public use. 29 | site = GenerateSite(compile=True) 30 | exit() 31 | 32 | # Generate site for local use. 33 | site = GenerateSite(compile=False) 34 | print('Initial site built') 35 | 36 | # Watchdog event handler 37 | class WatchSiteFiles(FileSystemEventHandler): 38 | def on_modified(self, event): 39 | if event.is_directory: 40 | return 41 | site.dispatch(event) 42 | 43 | if __name__ == '__main__': 44 | observer = None 45 | if '--watch' in sys.argv: 46 | # Set up Watchdog 47 | event_handler = WatchSiteFiles() 48 | observer = Observer() 49 | 50 | for path in watch_paths(): 51 | observer.schedule(event_handler, path, recursive=True) 52 | 53 | observer.start() 54 | 55 | # Set up HTTP server 56 | server = HighlightServer() 57 | 58 | # Set up signal handling to manage server quit 59 | signal.signal(signal.SIGINT, lambda sig, frame: signal_handler(sig, frame, server, observer)) 60 | server.run() 61 | -------------------------------------------------------------------------------- /src/resume/roles.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - role: Front End Developer 3 | summary: Results-driven front-end developer with over a decade's experience crafting dynamic websites and applications. Proficient in WordPress, Shopify, HTML, CSS, JavaScript, Node.js, React, PHP, Ruby, Python. Skilled in Linux servers and databases, dedicated to innovation. 4 | skills: 5 | - HTML, CSS, JavaScript 6 | - WordPress Customization 7 | - E-Commerce 8 | - Version Control 9 | - Code Quality 10 | - CSS Frameworks 11 | - Python 12 | - PHP 13 | - Ruby 14 | - role: WordPress Developer 15 | summary: Seasoned WordPress developer with ten years crafting websites and apps. Proficient in WordPress, WooCommerce, Shopify, excelling in custom plugin development, API integrations, HTML, CSS, JavaScript, PHP, and databases. Committed to inventive solutions. 16 | skills: 17 | - Theme Customization 18 | - Plugin Development 19 | - E-Commerce 20 | - Custom API I/O 21 | - HTML, CSS, JS 22 | - Database Management 23 | - role: Graphic Designer 24 | summary: Innovative graphic designer driven by passion and creativity in every design. Proficient in Adobe Creative Suite, Affinity Suite, brand identity creation, digital artistry, vector graphics, and web-optimized design. 25 | skills: 26 | - Adobe Creative Suite 27 | - Affinity Suite 28 | - Brand Identity 29 | - Digital Painting 30 | - Vector Graphics 31 | - Web-Optimized Design 32 | - role: Online Marketer 33 | summary: Driven online marketer leveraging creative design and analytical skills to develop campaigns. Proficient in Google Ads, Facebook Ads, ad copywriting, visual graphics creation, targeted audience segmentation, re-targeting, and Google Analytics. 34 | skills: 35 | - Google & Facebook Ads 36 | - Ad Copywriting 37 | - Visual Graphics Creation 38 | - Audience Segmentation 39 | - Re-Targeting Strategies 40 | - Google Analytics 41 | -------------------------------------------------------------------------------- /src/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} {% block content %} 2 | 3 |
4 |
5 | 9 |
10 |
11 |

{{ person.name }}

12 |

13 | {{ person.taglines.default }} 14 |

15 |
16 |
17 |

What are you looking for?

18 | 29 | 30 |

Learn more:

31 | 47 | 48 |

49 | Located in {{ person.contact.timezone }} 50 |

51 |
52 |
53 | 54 | {% endblock %} 55 | -------------------------------------------------------------------------------- /src/templates/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 | 14 | {{ person.name }} - {{ meta.title }} 15 | 38 | 39 | 40 | 58 |
{% block content %} {% endblock %}
59 | 60 | 61 | -------------------------------------------------------------------------------- /app/load.py: -------------------------------------------------------------------------------- 1 | from yaml import load 2 | try: 3 | from yaml import CLoader as Loader, CDumper as Dumper 4 | except ImportError: 5 | from yaml import Loader, Dumper 6 | from app.helpers import set_gravatar, set_github_avatar, load_pages, load_roles 7 | 8 | def get_global(compile=False): 9 | # Get global site settings 10 | with open('src/config.yaml', 'r') as config: 11 | settings = load(config, Loader=Loader) 12 | settings['cname'] = settings['url'] 13 | if compile == False: 14 | settings['url'] = 'http://localhost:4242' 15 | # Get person information 16 | with open('src/resume/about.yaml', 'r') as about_file: 17 | about = load(about_file, Loader=Loader) 18 | # Get Gravatar image 19 | if settings['avatar'] and 'github' == settings['avatar'] and about['contact']['github']: 20 | about['avatar'] = set_github_avatar( 21 | about['contact']['github'], 22 | 250 23 | ) 24 | else: 25 | about['avatar'] = set_gravatar( 26 | about['contact']['email'], 27 | 'src/assets/media/avatar.jpg', 28 | 250) 29 | # Clean links 30 | if 'links' in about: 31 | links = {} 32 | all_links = about['links'] 33 | for link in all_links: 34 | fresh_link = {} 35 | if not type(all_links[link]) is dict: 36 | fresh_link = { 37 | 'url': all_links[link], 38 | 'text': all_links[link], 39 | 'icon': '' 40 | } 41 | else: 42 | fresh_link = all_links[link] 43 | if not 'text' in fresh_link: 44 | fresh_link['text'] = fresh_link['url'] 45 | if not 'icon' in fresh_link: 46 | fresh_link['icon'] = '' 47 | links[fresh_link['url']] = fresh_link 48 | about['links'] = links 49 | # Get pages for navigation 50 | NAV = {} 51 | PAGES = load_pages() 52 | SET_PAGES = {} 53 | for page in PAGES: 54 | p = PAGES[page] 55 | # TODO: Optional page exclusion 56 | title = p['meta'].get('title') 57 | if 'anchor' in p['meta']: 58 | title = p['meta'].get('anchor') 59 | SET_PAGES[p['filename']] = { 60 | 'href': settings['url'] + '/' + p['filename'], 61 | 'anchor': title, 62 | 'order': p['meta'].get('order') if 'order' in p['meta'] else 2, 63 | } 64 | sort_pages = sorted( 65 | SET_PAGES.items(), key=lambda x: x[1]['order']) 66 | for i, p in sort_pages: 67 | NAV[i] = p 68 | settings['nav'] = NAV 69 | # Get roles 70 | settings['roles'] = load_roles() 71 | site = { 72 | "site": settings, 73 | "person": about, 74 | } 75 | return site 76 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # General 2 | .DS_Store 3 | .AppleDouble 4 | .LSOverride 5 | 6 | # Icon must end with two \r 7 | Icon 8 | 9 | # Thumbnails 10 | ._* 11 | 12 | # Files that might appear in the root of a volume 13 | .DocumentRevisions-V100 14 | .fseventsd 15 | .Spotlight-V100 16 | .TemporaryItems 17 | .Trashes 18 | .VolumeIcon.icns 19 | .com.apple.timemachine.donotpresent 20 | 21 | # Directories potentially created on remote AFP share 22 | .AppleDB 23 | .AppleDesktop 24 | Network Trash Folder 25 | Temporary Items 26 | .apdisk 27 | 28 | # Byte-compiled / optimized / DLL files 29 | __pycache__/ 30 | *.py[cod] 31 | *$py.class 32 | 33 | # C extensions 34 | *.so 35 | 36 | # Distribution / packaging 37 | .Python 38 | build/ 39 | develop-eggs/ 40 | dist/ 41 | downloads/ 42 | eggs/ 43 | .eggs/ 44 | lib/ 45 | lib64/ 46 | parts/ 47 | sdist/ 48 | var/ 49 | wheels/ 50 | share/python-wheels/ 51 | *.egg-info/ 52 | .installed.cfg 53 | *.egg 54 | MANIFEST 55 | 56 | # PyInstaller 57 | # Usually these files are written by a python script from a template 58 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 59 | *.manifest 60 | *.spec 61 | 62 | # Installer logs 63 | pip-log.txt 64 | pip-delete-this-directory.txt 65 | 66 | # Unit test / coverage reports 67 | htmlcov/ 68 | .tox/ 69 | .nox/ 70 | .coverage 71 | .coverage.* 72 | .cache 73 | nosetests.xml 74 | coverage.xml 75 | *.cover 76 | *.py,cover 77 | .hypothesis/ 78 | .pytest_cache/ 79 | cover/ 80 | 81 | # Translations 82 | *.mo 83 | *.pot 84 | 85 | # Django stuff: 86 | *.log 87 | local_settings.py 88 | db.sqlite3 89 | db.sqlite3-journal 90 | 91 | # Flask stuff: 92 | instance/ 93 | .webassets-cache 94 | 95 | # Scrapy stuff: 96 | .scrapy 97 | 98 | # Sphinx documentation 99 | docs/_build/ 100 | 101 | # PyBuilder 102 | .pybuilder/ 103 | target/ 104 | 105 | # Jupyter Notebook 106 | .ipynb_checkpoints 107 | 108 | # IPython 109 | profile_default/ 110 | ipython_config.py 111 | 112 | # pyenv 113 | # For a library or package, you might want to ignore these files since the code is 114 | # intended to run in multiple environments; otherwise, check them in: 115 | # .python-version 116 | 117 | # pipenv 118 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 119 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 120 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 121 | # install all needed dependencies. 122 | #Pipfile.lock 123 | 124 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 125 | __pypackages__/ 126 | 127 | # Celery stuff 128 | celerybeat-schedule 129 | celerybeat.pid 130 | 131 | # SageMath parsed files 132 | *.sage.py 133 | 134 | # Environments 135 | .env 136 | .venv 137 | env/ 138 | venv/ 139 | ENV/ 140 | env.bak/ 141 | venv.bak/ 142 | 143 | # Spyder project settings 144 | .spyderproject 145 | .spyproject 146 | 147 | # Rope project settings 148 | .ropeproject 149 | 150 | # mkdocs documentation 151 | /site 152 | 153 | # mypy 154 | .mypy_cache/ 155 | .dmypy.json 156 | dmypy.json 157 | 158 | # Pyre type checker 159 | .pyre/ 160 | 161 | # pytype static type analyzer 162 | .pytype/ 163 | 164 | # Cython debug symbols 165 | cython_debug/ 166 | 167 | 168 | # Logs 169 | logs 170 | *.log 171 | npm-debug.log* 172 | yarn-debug.log* 173 | yarn-error.log* 174 | lerna-debug.log* 175 | 176 | # Diagnostic reports (https://nodejs.org/api/report.html) 177 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 178 | 179 | # Runtime data 180 | pids 181 | *.pid 182 | *.seed 183 | *.pid.lock 184 | 185 | # Directory for instrumented libs generated by jscoverage/JSCover 186 | lib-cov 187 | 188 | # Coverage directory used by tools like istanbul 189 | coverage 190 | *.lcov 191 | 192 | # nyc test coverage 193 | .nyc_output 194 | 195 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 196 | .grunt 197 | 198 | # Bower dependency directory (https://bower.io/) 199 | bower_components 200 | 201 | # node-waf configuration 202 | .lock-wscript 203 | 204 | # Compiled binary addons (https://nodejs.org/api/addons.html) 205 | build/Release 206 | 207 | # Dependency directories 208 | node_modules/ 209 | jspm_packages/ 210 | 211 | # Snowpack dependency directory (https://snowpack.dev/) 212 | web_modules/ 213 | 214 | # TypeScript cache 215 | *.tsbuildinfo 216 | 217 | # Optional npm cache directory 218 | .npm 219 | 220 | # Optional eslint cache 221 | .eslintcache 222 | 223 | # Microbundle cache 224 | .rpt2_cache/ 225 | .rts2_cache_cjs/ 226 | .rts2_cache_es/ 227 | .rts2_cache_umd/ 228 | 229 | # Optional REPL history 230 | .node_repl_history 231 | 232 | # Output of 'npm pack' 233 | *.tgz 234 | 235 | # Yarn Integrity file 236 | .yarn-integrity 237 | 238 | # dotenv environment variables file 239 | .env 240 | .env.test 241 | 242 | # parcel-bundler cache (https://parceljs.org/) 243 | .cache 244 | .parcel-cache 245 | 246 | # Next.js build output 247 | .next 248 | out 249 | 250 | # Nuxt.js build / generate output 251 | .nuxt 252 | dist 253 | 254 | # Gatsby files 255 | .cache/ 256 | # Comment in the public line in if your project uses Gatsby and not Next.js 257 | # https://nextjs.org/blog/next-9-1#public-directory-support 258 | # public 259 | 260 | # vuepress build output 261 | .vuepress/dist 262 | 263 | # Serverless directories 264 | .serverless/ 265 | 266 | # FuseBox cache 267 | .fusebox/ 268 | 269 | # DynamoDB Local files 270 | .dynamodb/ 271 | 272 | # TernJS port file 273 | .tern-port 274 | 275 | # Stores VSCode versions used for testing VSCode extensions 276 | .vscode-test 277 | .vscode 278 | .prettierrc 279 | 280 | # yarn v2 281 | .yarn/cache 282 | .yarn/unplugged 283 | .yarn/build-state.yml 284 | .yarn/install-state.gz 285 | .pnp.* 286 | 287 | # Jetbrains stuff 288 | .idea -------------------------------------------------------------------------------- /app/build.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | from jinja2 import Environment, FileSystemLoader 4 | from app.load import get_global 5 | from app.helpers import load_pages, load_history 6 | 7 | class GenerateSite(): 8 | def __init__(self, compile=False): 9 | self.data = { 10 | 'compile': compile, 11 | 'has_compiled': False, 12 | 'site': get_global(compile=compile), 13 | 'env': Environment(loader=FileSystemLoader('src/templates')) 14 | } 15 | print('Generating the site...') 16 | self.build() 17 | 18 | def dispatch(self, event): 19 | print('Site regenerating on changed file:', event.src_path, '') 20 | self.build(regenerate=True) 21 | print('Site regenerated.') 22 | 23 | def build(self, destroy=False, regenerate=False): 24 | if regenerate: 25 | self.data['compile'] == False 26 | # Build site directory if it does not exist. 27 | if not os.path.exists('site'): 28 | os.mkdir('site') 29 | # Clear old site files. 30 | if self.data['compile'] or destroy: 31 | self.destroy() 32 | self.write_base_files() 33 | # Generate new site files. 34 | self.data['site'] = get_global(compile=self.data['compile']) 35 | self.generate_homepage() 36 | self.generate_pages() 37 | self.generate_resume() 38 | if regenerate or not self.data['has_compiled']: 39 | self.generate_assets() 40 | self.data['has_compiled'] = True 41 | return 42 | 43 | def generate_assets(self): 44 | postcss = 'npx postcss ./src/assets/css/styles.css -o ./site/assets/css/styles.css' 45 | os.system(postcss) 46 | 47 | def destroy(self): 48 | for root, dirs, files in os.walk('site/'): 49 | delete = ['.html', 'CNAME', '.nojekyll', 'css', 'assets'] 50 | for f in files: 51 | file = os.path.join(root, f) 52 | if any(search in file for search in delete): 53 | os.unlink(file) 54 | for d in dirs: 55 | dir = os.path.join(root, d) 56 | if any(search in dir for search in delete): 57 | shutil.rmtree(dir) 58 | 59 | def write_base_files(self): 60 | url = self.data['site']['site'].get('cname') 61 | # .nojekyll for GitHub Pages 62 | with open('site/.nojekyll', 'w') as file: 63 | file.write('') 64 | # CNAME for GitHub Pages custom subdomain 65 | with open('site/CNAME', 'w') as file: 66 | file.write(url) 67 | # Copy in local fonts. 68 | source_fonts = 'src/assets/fonts' 69 | destination_fonts = 'site/assets/fonts' 70 | shutil.copytree(source_fonts, destination_fonts, dirs_exist_ok=True) 71 | 72 | def generate_homepage(self): 73 | env = self.data['env'] 74 | site = self.data['site'] 75 | 76 | meta = { 77 | 'title': site['person']['name'] 78 | } 79 | # Set template 80 | template = env.get_template('home.html') 81 | # Write page to template 82 | page = template.render( 83 | meta=meta, 84 | person=site['person'], 85 | site=site['site'], 86 | ) 87 | # Save page 88 | with open('site/index.html', 'w') as file: 89 | file.write(page) 90 | 91 | 92 | def generate_pages(self, single=False): 93 | env = self.data['env'] 94 | site = self.data['site'] 95 | PAGES = load_pages() 96 | 97 | for p in PAGES: 98 | slug = PAGES[p].get('filename') 99 | content = PAGES[p].get('content') 100 | meta = PAGES[p].get('meta') 101 | # Set template 102 | set_template = 'page' 103 | if 'template' in meta: 104 | set_template = meta.get('template') 105 | template = env.get_template(set_template + '.html') 106 | # Write page to template 107 | page = template.render( 108 | page=content, 109 | meta=meta, 110 | person=site['person'], 111 | site=site['site'] 112 | ) 113 | # Set slug 114 | if 'slug' in meta: 115 | slug = meta.slug 116 | # Save page 117 | with open('site/' + slug + '.html', 'w') as file: 118 | file.write(page) 119 | 120 | def generate_resume(self): 121 | env = self.data['env'] 122 | site = self.data['site'] 123 | 124 | ROLES = site.get('site').get('roles') 125 | RESUMES = {} 126 | for role in ROLES: 127 | r = ROLES[role] 128 | # Get related history items 129 | history = load_history(r['role']) 130 | # Set meta 131 | meta = { 132 | 'title': r.get('role') 133 | } 134 | # Set slug 135 | slug = r.get('slug') 136 | if 'slug' in meta: 137 | slug = meta.slug 138 | # Set template 139 | set_template = 'resume' 140 | if 'template' in meta: 141 | set_template = meta.get('template') 142 | template = env.get_template(set_template + '.html') 143 | # Write page to template 144 | page = template.render( 145 | meta=meta, 146 | role=r, 147 | person=site['person'], 148 | site=site['site'], 149 | experience=history 150 | ) 151 | # Save page 152 | with open('site/' + slug + '.html', 'w') as file: 153 | file.write(page) 154 | 155 | -------------------------------------------------------------------------------- /src/templates/resume.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} {% block content %} 2 |
5 |
8 |
9 |

10 | {{ person.name }} 11 |

12 |

13 | {{ role.role }} 14 |

15 |
    16 | {% for key, value in person.contact.items() %} {% if key != 17 | 'github' %} 18 |
  • {{ value }}
  • 19 | {% endif %} {% endfor %} 20 |
21 | 50 |

Education

51 |
    52 | {% for edu in person.education %} 53 |
  • 54 |

    55 | {{ edu }} 56 | {{ person.education[edu].graduation }} 59 |

    60 |

    61 | {{ person.education[edu].school }}
    62 | {{ person.education[edu].degree }}, {{ 63 | person.education[edu].study }} 64 |

    65 |
  • 66 | {% endfor %} 67 |
68 |

Skills

69 |
    70 | {% for category in person.skills %} 71 |
  • 72 |

    75 | {{ category }} 76 |

    77 |
      78 | {% for skill in person.skills[category] %} 79 |
    • 80 | {{ skill.skill }} 81 | {{ skill.years }} {{ 'yr' if skill.years == 1 83 | else 'yrs' }} 85 |
    • 86 | {% endfor %} 87 |
    88 |
  • 89 | {% endfor %} 90 |
91 |
92 |
93 |

94 | {{ role.role }} 95 |

96 |

99 | {{ role.summary }} 100 |

101 |
104 |

107 | Skillset 108 |

109 |
    112 | {% for skill in role.skills %} 113 |
  • {{ skill }}
  • 114 | {% endfor %} 115 |
116 |
117 | {% for exp in experience %} {% set work = experience[exp] %} 118 |
119 |

122 | {{ work.role }} 123 |

124 |
    125 |
  • 126 | {{ work.company }} 129 | · {{ work.type }} · {{ work.location }} 130 |
  • 131 |
  • 132 | {{ work.start }} – {{ work.end }} ({{ work.length }}) 133 |
  • 134 |
135 |

136 | {{ work.description }} 137 |

138 |
139 | {% endfor %} 140 |
141 |
142 |
143 | {% endblock %} 144 | -------------------------------------------------------------------------------- /app/helpers.py: -------------------------------------------------------------------------------- 1 | import urllib 2 | import hashlib 3 | import os 4 | import markdown 5 | import yaml 6 | import datetime 7 | import math 8 | from slugify import slugify 9 | 10 | def watch_paths(): 11 | paths = [ 12 | 'src/pages', 13 | 'src/resume', 14 | 'src/templates', 15 | 'src/assets/css', 16 | ] 17 | return paths 18 | 19 | def load_history(role): 20 | PAST = {} 21 | CURRENT = {} 22 | # Set file names 23 | LIST = {} 24 | for page in os.listdir('src/resume/history'): 25 | LIST[page] = os.path.join('src/resume/history', page) 26 | # Read YAML from each file 27 | for item in LIST: 28 | # Load experience 29 | experience = False 30 | with open(LIST[item], 'r') as stream: 31 | try: 32 | experience = yaml.safe_load(stream) 33 | except yaml.YAMLError as exc: 34 | print(exc) 35 | # Process experience 36 | include = False 37 | if not experience is False: 38 | # Optionally allow job: definition 39 | if experience.get('job'): 40 | experience = experience.get('job') 41 | # Is this listed as included? 42 | includes = experience.get('include') 43 | look_for = ['All', role] 44 | if includes and any(search in includes for search in look_for): 45 | include = True 46 | # Is this role explicitly excluded for this experience? 47 | excludes = experience.get('exclude') 48 | if excludes and any(search in excludes for search in [role]): 49 | include = False 50 | # If including, carry on 51 | if include is True: 52 | # Process YAML data to pass onto page 53 | # titles (default, Role) 54 | # company 55 | # location 56 | # url 57 | # type 58 | # dates (YYYY-MM): start, end 59 | # skills: base, default, Role 60 | # descriptions: default, Role 61 | title = experience.get('titles')[role] if role in experience.get( 62 | 'titles') else experience.get('titles')['default'] 63 | # print('MATH FOR JOB TITLE', title) 64 | base_skills = experience.get('skills')['base'] 65 | special_skills = experience.get('skills')[role] if role in experience.get( 66 | 'skills') else experience.get('skills')['default'] 67 | skills = base_skills + special_skills 68 | description = experience.get('descriptions')[role] if role in experience.get( 69 | 'descriptions') else experience.get('descriptions')['default'] 70 | start = '' 71 | end = 'Present' 72 | sort = datetime.datetime.now() 73 | if 'dates' in experience: 74 | if 'start' in experience.get('dates'): 75 | start_dt = experience.get('dates')['start'] 76 | start_dt_obj = datetime.datetime.strptime( 77 | start_dt, '%Y-%m') 78 | start_formatted = datetime.datetime.strftime( 79 | start_dt_obj, '%b %Y') 80 | start = start_formatted 81 | if 'end' in experience.get('dates') and not experience.get('dates')['end'] == 'Present': 82 | end_dt = experience.get('dates')['end'] 83 | end_dt_obj = datetime.datetime.strptime( 84 | end_dt, '%Y-%m') 85 | end_formatted = datetime.datetime.strftime( 86 | end_dt_obj, '%b %Y') 87 | end = end_formatted 88 | sort = start_dt_obj 89 | length = date_diff(start_dt_obj, end_dt_obj) 90 | else: 91 | sort = start_dt_obj + datetime.timedelta(days=2) 92 | length = date_diff( 93 | start_dt_obj, datetime.datetime.now()) 94 | 95 | bundle = { 96 | 'role': title, 97 | 'company': experience.get('company') if 'company' in experience else '', 98 | 'location': experience.get('location') if 'location' in experience else '', 99 | 'url': experience.get('url') if 'url' in experience else '', 100 | 'type': experience.get('type') if 'type' in experience else '', 101 | 'skills': skills, 102 | 'description': description, 103 | 'sort': sort, 104 | 'start': start, 105 | 'end': end, 106 | 'length': length 107 | } 108 | if bundle['end'] == 'Present': 109 | CURRENT[item] = bundle 110 | else: 111 | PAST[item] = bundle 112 | # End inclusion if statement 113 | # TODO sort relavent history by date 114 | WORK = {} 115 | sort_past = sorted( 116 | PAST.items(), key=lambda x: x[1]['sort'], reverse=True) 117 | sort_current = sorted( 118 | CURRENT.items(), key=lambda x: x[1]['sort'], reverse=True) 119 | for i, h in sort_current: 120 | WORK[i] = h 121 | for i, h in sort_past: 122 | WORK[i] = h 123 | return WORK 124 | 125 | 126 | def load_roles(): 127 | ROLES = {} 128 | with open("src/resume/roles.yaml", 'r') as stream: 129 | try: 130 | find = yaml.safe_load(stream) 131 | # Turn list into dictionary 132 | for f in find: 133 | ROLES[f['role']] = f 134 | if not 'slug' in ROLES[f['role']]: 135 | ROLES[f['role']]['slug'] = slugify(f['role']) 136 | except yaml.YAMLError as exc: 137 | print('error') 138 | return ROLES 139 | 140 | 141 | def load_pages(): 142 | PAGES = {} 143 | for page in os.listdir('src/pages'): 144 | file_path = os.path.join('src/pages', page) 145 | 146 | with open(file_path, 'r') as file: 147 | md = markdown.Markdown(extensions=['meta']) 148 | # Process HTML 149 | html = md.convert(file.read()) 150 | # Process metadata, return each as string 151 | meta = {} 152 | for m in md.Meta: 153 | meta[m] = md.Meta[m][0] 154 | # Clean filename 155 | filename_ext = os.path.basename(file.name) 156 | filename = os.path.splitext(filename_ext)[0] 157 | # Add to overall page collection 158 | PAGES[page] = { 159 | 'filename': filename, 160 | 'content': html, 161 | 'meta': meta, 162 | } 163 | return PAGES 164 | 165 | 166 | def tailwind_os(status=''): 167 | postcss = 'npx postcss ./assets/css/styles.css -o ./site/assets/css/styles.css' 168 | return postcss 169 | 170 | def set_github_avatar(github, size): 171 | github_url = 'https://github.com/' 172 | github_url += github 173 | github_url += '.png?size=' + str(size) 174 | return github_url 175 | 176 | def set_gravatar(email, default, size): 177 | encoded_email = email.encode('utf-8') 178 | hashed_email = hashlib.md5(encoded_email.lower()).hexdigest() 179 | gravatar_url = "https://www.gravatar.com/avatar/" 180 | gravatar_url += hashed_email + "?" 181 | gravatar_url += urllib.parse.urlencode( 182 | { 183 | 'd': default, 184 | 's': str(size) 185 | }) 186 | return gravatar_url 187 | 188 | def date_diff(then, now, format='%Y-%m'): 189 | # Ensure we are working with datetime values. 190 | now = now if isinstance(now, datetime.datetime) else datetime.datetime.strptime(now, format) 191 | then = then if isinstance(then, datetime.datetime) else datetime.datetime.strptime(then, format) 192 | # Calculate the difference between the dates. 193 | diff = now - then 194 | # Extract years and remaining days. 195 | years = diff.days // 365 196 | remaining_days = diff.days % 365 197 | # Convert remaining days to months. 198 | months = math.ceil(remaining_days / 30) if remaining_days > 14 else remaining_days // 30 199 | # Avoid accidentally rounding up to 12 months or more. 200 | if months > 11: 201 | years += 1 202 | months -= 12 203 | # Convert date dato to human readable string. 204 | date_info = [] 205 | if years > 0: 206 | date_info.append(f"{years} {'yr' if years == 1 else 'yrs'}") 207 | if months > 0: 208 | date_info.append(f"{months} {'mo' if months == 1 else 'mos'}") 209 | return " ".join(date_info) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Highlight: a Static Site Generator

2 | 3 |

Highlight is a lightweight, opinionated Static Site Generator (SSG) for quickly creating a beautiful resume and portfolio site that targets multiple ideal roles.

4 | 5 | ![Highlight Site Preview](https://user-images.githubusercontent.com/1281008/107776426-d93eb780-6d41-11eb-85b9-c3954b4fe843.png) 6 | 7 | [Landing Page](https://highlight.dorko.dev) | [Demo](https://demo.highlight.dorko.dev/) | [Live Usage](https://hire.annedorko.com) 8 | 9 | If you are using Highlight and wish to be featured, please [contact me](https://github.com/annedorko/highlight#contact). 10 | 11 | **Note:** This project is experimental. Updates may introduce breaking changes. [Please follow these instructions for upgrading your Highlight installation.](https://github.com/annedorko/highlight/wiki/Updating-Highlight-Versions) Keep backups of your data and implement Highlight at your own risk! 12 | 13 | ## Who is it for? 14 | 15 | Highlight is built by and for generalists who often need tweaked versions of their resume and portfolio to be appealing for different opportunities. This SSG is built to help you _highlight_ the right parts of your diverse skill-set and experiences to the right people, quickly and elegantly. 16 | 17 | Highlight is a Static Site Generator, which means the output can be hosted anywhere as plain HTML and CSS. By default it is configured to deploy to Github Pages automatically. 18 | 19 | This repo uses dummy data (which still features much of my own resume) and the results of the auto-deployment through Github Pages can be viewed here: [Highlight Demo Site](https://demo.highlight.dorko.dev). 20 | 21 | ## Built With 22 | 23 | - [TailwindCSS](https://github.com/tailwindlabs/tailwindcss) 24 | - [Jinja](https://palletsprojects.com/p/jinja/) 25 | 26 | ## Getting Started 27 | 28 | If you use this project base, modify this project to suit your own resume and portfolio activities! 29 | 30 | ### Prerequisites 31 | 32 | Built using: 33 | 34 | - Python 3+ 35 | - Node.js 21+ 36 | - NPM 10+ 37 | 38 | The program may work on lower versions of Node or NPM but has not been thoroughly tested. 39 | 40 | ### Installation 41 | 42 | Please [check the wiki](https://github.com/annedorko/highlight/wiki/Installation/) for more detailed installation instructions. 43 | 44 | #### 1. Clone this repo into a clean project folder. 45 | ```shell 46 | git clone https://github.com/annedorko/highlight.git 47 | ``` 48 | 49 | Alternatively, you can [create a new project using Highlight as a Template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template) and checkout your new project before proceeding. 50 | 51 | #### 2. Navigate into your project folder using the console. 52 | 53 | ```shell 54 | cd highlight 55 | ``` 56 | 57 | #### 3. Install NPM packages. 58 | ```shell 59 | npm install 60 | ``` 61 | 62 | #### 4. Install Python package requirements. 63 | 64 | Depending on your preference, you can use pip, pipenv, or conda to install the requirements using the convenient npm scripts provided: 65 | 66 | ```shell 67 | npm run install-pip 68 | ``` 69 | ```shell 70 | npm run install-pipenv 71 | ``` 72 | ```shell 73 | npm run install-conda 74 | ``` 75 | 76 | #### 4. Get started! 77 | 78 | Get started developing! The following command will use `python3` to execute the start-up script which generates your Highlight site, watches for changes, and makes them available in the browser at http://localhost:4242 79 | 80 | ```shell 81 | npm run develop 82 | ``` 83 | 84 | Learn more about [available scripts in the wiki](https://github.com/annedorko/highlight/wiki/Installation/). 85 | 86 | ## Usage 87 | 88 | This repo is full of example data. Currently, that data is mostly from my own resume. You can use it as a reference to create your own site. 89 | 90 | Data in Highlight is managed through [YAML](https://yaml.org/refcard.html). If you receive errors it is likely because the YAML got mis-formatted. Be sure to follow the same indentations and patterns as provided in the example data! 91 | 92 | As Highlight is so young, the YAML formatting may slightly change from update to update without backward compatibility, so be sure to check for any special notes before updating to use new Highlight features. 93 | 94 | ### Step 1. Configure Site 95 | 96 | 1. Open `src/config.yaml` 97 | 2. Change the `url` setting to the root domain your site will be published at. 98 | 99 | This URL controls: 100 | - The root of your links throughout the site 101 | - The CNAME for Github Pages to support custom domains 102 | 103 | Note: Highlight automatically generates a [.nojekyll file](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/) to support Github Page deployment. 104 | 105 | ### Step 2. Start Site for Local Editing 106 | 107 | If you haven’t already, you can start the development server using the following command: 108 | 109 | ```shell 110 | npm run develop 111 | ``` 112 | 113 | ### Step 3. Update Your Bio 114 | 115 | 1. Open `src/resume/about.yaml` 116 | 2. Edit the data to reflect your name, contact information, skills, and more. 117 | 118 | This document contains the data that is the same across all your resume and portfolio items. 119 | 120 | - Name 121 | - Tagline 122 | - Work availability 123 | - Skills grouped by category 124 | - Important links 125 | - Contact information 126 | - Education 127 | 128 | 129 | By default, your email will also be used to pull your Gravatar image, so I recommend ensuring you have an account there associated with your work email. Set up a professional photo that looks great on the homepage. 130 | 131 | Alternatively, you can set `avatar` to `github` in the `src/config.yaml` file and ensure that your Github username is set under `contact` in the `src/resume/about.yaml` file. 132 | 133 | Something like this: 134 | 135 | ```yaml 136 | avatar: github 137 | ``` 138 | 139 | ```yaml 140 | contact: 141 | email: you@example.com 142 | phone: +1 555 321 5432 143 | timezone: Pacific 144 | github: yourusername 145 | ``` 146 | 147 | #### Skills 148 | 149 | Categories can be written using alphanumeric values followed by a colon. If you need to include a colon in your category name, be sure to surround it with quotes. 150 | 151 | For example: 152 | 153 | - Good: `Music Production:` 154 | - Good: `'Music: Production':` 155 | - Bad: `Music: Production:` 156 | 157 | #### Links 158 | 159 | Links can be plain text, like so: 160 | 161 | `Homepage: 'https://www.annedorko.com'` 162 | 163 | Or, you can optionally provide a URL, anchor text, and even a [FontAwesome icon](https://fontawesome.com/icons?d=gallery&m=free). This makes your resume look much cleaner and enables you to include icons for Twitter, LinkedIn, or whatever sites you may be referencing. 164 | 165 | _Without icon:_ 166 | ``` 167 | Homepage: 168 | url: 'https://www.annedorko.com' 169 | text: 'annedorko.com' 170 | ``` 171 | 172 | _With icon:_ 173 | ``` 174 | Homepage: 175 | url: 'https://www.annedorko.com' 176 | text: 'annedorko.com' 177 | icon: '' 178 | ``` 179 | 180 | #### about.yaml Template 181 | 182 | Here is a blank template with a few required stand-ins if you’d like to start from scratch. Feel free to cross-reference these values with the default about.yaml to better understand how to use them. 183 | 184 | ``` 185 | --- 186 | name: '' 187 | taglines: 188 | default: '' 189 | open: 190 | available: true 191 | seeking: '' 192 | location: '' 193 | skills: 194 | Your Category Here: 195 | - skill: Write a Skill 196 | years: 1 197 | - skill: Another Skill 198 | years: 4 199 | Your 2nd Category Here: 200 | - skill: Another Skill 201 | years: 2 202 | links: 203 | Homepage: 204 | url: '' 205 | text: '' 206 | LinkedIn: 'https://linkedin.com' 207 | contact: 208 | email: '' 209 | phone: '' 210 | timezone: '' 211 | education: 212 | Degree Name Here: 213 | school: '' 214 | degree: '' 215 | study: '' 216 | graduation: '' 217 | ``` 218 | 219 | ### Step 4. Add Your Target Roles 220 | 221 | 1. Open `src/resume/roles.yaml` 222 | 2. Edit the values to reflect your target roles. 223 | 224 | This document is the root of all your generated resumes. There is no limit to the number of target roles you can add, as long as you follow the YAML format! **Every role you add will generate a new resume page targeted towards that role.** 225 | 226 | Every role requires: 227 | 228 | - Role/Title Name 229 | - Professional Summary 230 | - List of Essential Skills (Multiples of 3 work best) 231 | 232 | #### Preview Role Summary 233 |

234 | 235 | This information will appear at the top of your resume, as shown above. 236 | 237 | #### role.yaml Template 238 | 239 | Here is a blank template with a few required stand-ins if you’d like to start from scratch. Feel free to cross-reference these values with the default role.yaml to better understand how to use them. 240 | 241 | ``` 242 | --- 243 | - role: Role Name 244 | summary: Professional summary. 245 | skills: 246 | - Skill 1 247 | - Skill 2 248 | - Skill 3 249 | - role: 2nd Role Name 250 | summary: Professional summary. 251 | skills: 252 | - Skill 1 253 | - Skill 2 254 | - Skill 3 255 | ``` 256 | 257 | ### Step 5. Add Your Work History 258 | 259 | Without adding any career history, your generated resumes will look a bit empty. You will need to add work history to your `src/resume/history/` folder. 260 | 261 | Each file represents a single element that will show up on your resumes. You will need to add a new file per work history item. 262 | 263 | The file names don’t matter, so long as they are unique. I use a `YYYY-company-name.yaml` format so it’s easier to find what I’m looking for later. 264 | 265 | These documents define: 266 | 267 | - Which resumes to include the experience on. 268 | - The role you played, adjustable per target resume role. 269 | - Company name 270 | - Company location 271 | - Company URL 272 | - Type of work (Full-time, part-time, freelance, etc.) 273 | - Dates: Start and end. Requires a 'YYYY-MM' format for both values, or you can use 'Present' for end date. 274 | - Skills used on the job. Base is for all target roles, default is used by default, or you can add target-role-specific lists as well. Will be relevant on portfolio pages in the future. 275 | - Description, adjustable per target resume role. 276 | 277 | Titles and descriptions all both required, and both require default values. 278 | 279 | Skills are not required. If included, skills require both base and default values. (Currently, skills are not necessary to add here but will be helpful for when portfolio pages are available in the app.) 280 | 281 | If you do not follow the required date format, the script will not run correctly. The script will automatically supply the number of years and months. 282 | 283 | #### Adding and Customizing Work Experience to a Target Role Resume 284 | 285 | To add a work experience to all resumes, use: 286 | ``` 287 | include: 288 | - All 289 | ``` 290 | 291 | To add a work experience to specific resumes, list them under include in a list. 292 | 293 | ``` 294 | include: 295 | - Target Role 296 | - Target Role 2 297 | - Target Role 3 298 | ``` 299 | 300 | **Since v0.1.0:** To add a work experience to all *except* specific resumes, use the All keyword under include, and use an exclude list to remove it from only those roles: 301 | 302 | ``` 303 | exclude: 304 | - Target Role 305 | - Target Role 2 306 | - Target Role 3 307 | ``` 308 | 309 | Titles and descriptions need a default title, to start. If you would like to change your title role for specific resumes, you can do so by listing the name of the target role followed by the name of your changed title. 310 | 311 | This is particularly helpful if you played many roles within a company, and want to highlight one role over another for a specific resume. 312 | 313 | ``` 314 | titles: 315 | default: Job Title 316 | Target Role: Adjusted Job Title 317 | Target Role 3: Secondary Job Title 318 | ``` 319 | 320 | In the above example, "Job Title" will show by default on any resume you include it on. Resumes for "Target Role" and "Target Role 3" will be customized to use the provided titles. 321 | 322 | The same goes for descriptions! 323 | 324 | ``` 325 | descriptions: 326 | default: Job Title 327 | Target Role 2: Adjusted Job Title 328 | ``` 329 | 330 | You can add as many or few customizations as necessary. The default will always be used if you have not provided a specific version. I recommend starting with just the default, and adding customizations as needed when you generate new resumes. 331 | 332 | #### history/*.yaml Template 333 | 334 | Here is a blank template with a few required stand-ins if you’d like to start from scratch. Feel free to cross-reference these values with the example history files to better understand how to use them. 335 | 336 | ``` 337 | --- 338 | include: 339 | - All 340 | titles: 341 | default: Job Title 342 | company: Company Name 343 | location: Company City, Country 344 | url: https://www.example.com/ 345 | type: '' 346 | dates: 347 | start: 2010-03 348 | end: Present 349 | skills: 350 | base: 351 | - Skills 352 | default: 353 | - Other Skills 354 | descriptions: 355 | default: Default description of experience. 356 | ``` 357 | 358 | ### Step 6. Edit, Add, and Delete Site Pages 359 | 360 | Finally, you will need to adjust your site pages! You can add as many or few pages as you’d like. These will be linked to at the top of your site in the navigation bar. These will be useful if you plan to send the web versions of your resumes to people. 361 | 362 | Your site pages are managed in markdown files under `src/pages/`. Here is an [introduction to markdown](https://www.markdownguide.org/getting-started/) if you are not familiar with it. 363 | 364 | Since your homepage is generated automatically based on the `about.yaml` and `roles.yaml` files, do not create an `index.md` page. Otherwise, you can create whatever pages you like. 365 | 366 | I have included a simple About and Contact page. 367 | 368 | You can customize the order the pages show up in your navigation by changing the order value in the meta data. Lower numbers will show first, higher numbers will show later. In the example pages you can see that the About page shows first, with an order of `0`, and the contact page shows second, with an order of `2`. 369 | 370 | You can set `title`, `slug`, and `order` in the markdown metadata. 371 | 372 | ### Step 7. Optional: Compile Your Site for Uploading Manually 373 | 374 | Highlight now supports Github Page deployment automatically. This means you can store the entire project using Github and it will deploy to a gh-pages branch from which you can serve your shiny new resume site. 375 | 376 | If you wish to host else where you can use this command to generate the site under the `site/` folder: 377 | 378 | ```shell 379 | npm run build 380 | ``` 381 | 382 | The contents of the `site/` folder can then be uploaded wherever you would like to host the website. 383 | 384 | ### Step 8: Print to PDF Using Chrome 385 | 386 | Highlight comes with custom print styles to ensure your resume can easily be saved as a PDF using the "Print to PDF" feature. 387 | 388 | Simply navigate to your desired resume page on the website and _Print to PDF_. I recommend using Chrome if you experience any formatting issues. Note, in Firefox you will have to manually disable the header and footer text output as this cannot be overridden in the CSS automatically. 389 | 390 | Learn more about [customizing fonts and other theme styles](https://github.com/annedorko/highlight/wiki/Customizing-the-Theme) in the wiki. 391 | 392 | ## Roadmap 393 | 394 | See [open issues](https://github.com/annedorko/highlight/issues) for a list of proposed features and known issues. 395 | 396 | ## License 397 | 398 | Distributed under the `GNU GPLv3` license. See `LICENSE` for more information. 399 | 400 | ## Contact 401 | 402 | Anne Dorko - [LinkedIn](https://www.linkedin.com/in/annedorko) - [@annedorko](https://twitter.com/annedorko) - [anne@dorko.tv](mailto:anne@dorko.tv) 403 | 404 | Project Link: [github.com/annedorko/highlight](https://github.com/annedorko/highlight) 405 | 406 | ## Acknowledgements 407 | 408 | This project was to get my own flexible resume and portfolio running as well as experiment with Python in a new environment. Below are packages I used and resources I referenced along the way. 409 | 410 | ### Packages 411 | - [Python-Markdown](https://github.com/Python-Markdown/markdown) 412 | - [PyYAML](https://pyyaml.org/wiki/PyYAMLDocumentation) 413 | - [Jinja](https://palletsprojects.com/p/jinja/) 414 | - [watchdog](https://pypi.org/project/watchdog/) 415 | - [unicode_slugify](https://pypi.org/project/unicode-slugify/) 416 | 417 | ### Resources 418 | - [othneildrew’s Best README Template](https://github.com/othneildrew/Best-README-Template) 419 | - [nqcm’s Static Site Generator Tutorial](https://github.com/nqcm/static-site-generator) 420 | - [Ansible YAML Syntax Documentation](https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html) 421 | 422 | ### Contributors 423 | 424 |
425 | 426 | [
@annedorko](https://github.com/annedorko/) 427 | 428 | [
@Stedders](https://github.com/Stedders/) 429 | 430 |
431 | 432 | 433 | 434 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------