Code Monkey home page Code Monkey logo

free-programming-books-search's Introduction

free-programming-books-search

The free-programming-books-search is a companion project of free-programming-books. It allows users to search by book title or author and filter by language. The search index is updated once per day, so changes made on free-programming-books may not be immediately reflected.

Contents

How It All Works

  1. THERE IS NO DATABASE INVOLVED. Rather, the books are stored in a markdown on free-programming-books and is parsed daily by free-programming-books-parser. The books and all info pertaining to them are stored in a JSON file called fpb.json.

  2. This JSON is downloaded locally and searched locally when the actual search function is used.

Installation

NPM Installation

  1. Make sure you have Node.js installed. If you already do, skip to Running the Website.
  2. Otherwise, download the LTS installer from Node.js website.
  3. Follow the instructions of the installer, make sure npm is listed as a package to be installed.
  4. Click Install.
  5. Verify that Node.Js has been installed by going to command line and typing in node. It should show the current version.
  6. Close out of Node by either closing and reopening the command line or with Ctrl + C.
  7. Make sure to check out the NPM website for more info.

Running the Website

  1. Make sure you have Git installed.
  2. Clone the repo from Github with Git.
  3. Navigate to the folder using command line. A easy way is to type "cd" and then drag and drop the folder into command line.
  4. Type npm install.
  5. Type npm install react-scripts.
  6. Type npm start. At this point, the command prompt should start up the server, and a tab in your default browser should open up to localhost.

Deployment

MAKE SURE YOU HAVE COMPLETED THE INSTALLATION STEPS FIRST!

  1. First, make sure that you the local folder containing the files has a remote configured called "origin".
    1. If you aren't sure, navigate to the folder using Git (type "cd", then drag and drop folder in to Git command line).
    2. Type git init.
    3. Type git remote add origin <repo url>, replacing <repo url> with the url of your github repository.
  2. Now, run npm install -g gh-pages.
  3. Run npm run deploy.
  4. This should deploy your code to "https://yourusername.github.io/free-programming-books-search/".

FAQ

  • What database are we using to store the books?

    • NONE! The books are stored in a JSON file which is downloaded locally.
  • I added a book but it's not showing up on search?

    • Give it some time. The parser is run once a day, so it may take up to 24 hours for the search to reflect that.

free-programming-books-search's People

Contributors

4dylanregan avatar brogan20 avatar davorpa avatar dpekata avatar eshellman avatar github-actions[bot] avatar leoouyang24 avatar luigiimvector avatar nrfq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

free-programming-books-search's Issues

Danish not recognized

I was trying to use fpb.json to improve my telegram bot (EbookFoundation/free-programming-books#6263) and I noticed an anomaly, there is an element with no language:

{
  "language": {},
  "index": {},
  "sections": [
    {
       "section": "C",
       "entries": [
          {
             "url": "https://web.archive.org/web/20190701062226/http://artcreationforever.com/bgnet.html",
             "title": "Beej's Guide til Netvarksprogrammierung",

The problem is that on free-programming-books this file is called free-programming-books-dk but on the languages.js the Danish is equal to da.

I didn't create a PR to rename the file because I don't know which language code to use; ISO 639-2 list says that the code of Danish language is da.


Using the search the resources are there, although with some resources writing the full title does not find them, you have to delete a few characters, for example:

  • Object-oriented Programming in C#: you have to delete in C#
  • Objektorienteret programmering i Java: you have to delete ava

Obviously without language.code value the result is:
image

There are some relative urls with a harcoded contextPath

There are some hardcoded values in the app that doesn't allow deploy it in other contextPath different of /free-programming-books-search

if (folder && file) {
return <a id={id} href={`/free-programming-books-search/?&sect=${folder}&file=${file}`}>{children}</a>;
} else if (file) {
return <a id={id} href={`/free-programming-books-search/?file=${file}`}>{children}</a>;
} else { // Go to the homepage when there's a bad relative URL
return <a id={id} href={`/free-programming-books-search/`}>{children}</a>
}

Use environment instead of:

https://medium.com/@hernan.massad/running-create-react-app-from-non-root-context-path-95be40e3acf0

Layout breaks when content is too wide

Description

It seems there are a bug since #27 due to set width: auto reseting rule section>section

image

Using width: 100% or removing rule property should be enough

Context

Expected

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.