All Projects → shlomif → Fortune Mod

shlomif / Fortune Mod

Licence: other
Implementation of the Unix fortune command for displaying a random quotation, for Linux and other systems.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Fortune Mod

Augur
Python library and web service for Open Source Software Health and Sustainability metrics & data collection.
Stars: ✭ 304 (+94.87%)
Mutual labels:  hacktoberfest, open-source, opensource, unix
Freedomotic
Open IoT Framework
Stars: ✭ 354 (+126.92%)
Mutual labels:  hacktoberfest, open-source, opensource
Angular Open Source Starter
This is a starter project for creating open-source libraries for Angular. It is a full fledged Angular workspace with demo application and easy library addition. It is designed to be used for open-sourcing libraries on Github and has everything you'd need ready for CI, code coverage, SSR testing, StackBlitz demo deployment and more.
Stars: ✭ 120 (-23.08%)
Mutual labels:  hacktoberfest, open-source, opensource
Hacktoberfest 2020
Welcome to Open-source! Simply add your details to contributors | Repo for Hacktoberfest 2020 ✅
Stars: ✭ 621 (+298.08%)
Mutual labels:  hacktoberfest, open-source, opensource
Laracom
Laravel FREE E-Commerce Software
Stars: ✭ 1,570 (+906.41%)
Mutual labels:  hacktoberfest, open-source, opensource
Open Pixel Art
A collaborative pixel art project to teach people how to contribute to open-source
Stars: ✭ 331 (+112.18%)
Mutual labels:  hacktoberfest, open-source, opensource
Awesome Open Source Supporters
⭐️ A curated list of companies that offer their services for free to Open Source projects
Stars: ✭ 457 (+192.95%)
Mutual labels:  hacktoberfest, open-source, opensource
Data Structures And Algorithms In Cpp
This repository is in development phase and will soon provide you with c++ code of various data structures and algorithms
Stars: ✭ 176 (+12.82%)
Mutual labels:  hacktoberfest, open-source, opensource
Open Source Mac Os Apps
🚀 Awesome list of open source applications for macOS. https://t.me/s/opensourcemacosapps
Stars: ✭ 28,908 (+18430.77%)
Mutual labels:  hacktoberfest, open-source, opensource
Android Foss
A list of Free and Open Source Software (FOSS) for Android – saving Freedom and Privacy.
Stars: ✭ 832 (+433.33%)
Mutual labels:  open-source, opensource, foss
Place2live
Analysis of the characteristics of different countries
Stars: ✭ 30 (-80.77%)
Mutual labels:  hacktoberfest, open-source, opensource
Online
Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
Stars: ✭ 278 (+78.21%)
Mutual labels:  hacktoberfest, open-source, opensource
Server
☁️ Nextcloud server, a safe home for all your data
Stars: ✭ 17,723 (+11260.9%)
Mutual labels:  hacktoberfest, open-source, opensource
Android
📱 Nextcloud Android app
Stars: ✭ 2,669 (+1610.9%)
Mutual labels:  hacktoberfest, open-source, opensource
Rocket.chat.electron
Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat
Stars: ✭ 1,108 (+610.26%)
Mutual labels:  hacktoberfest, opensource, foss
Cortx
CORTX Community Object Storage is 100% open source object storage uniquely optimized for mass capacity storage devices.
Stars: ✭ 426 (+173.08%)
Mutual labels:  hacktoberfest, open-source, opensource
Enclosure Picroft
Mycroft interface for Raspberry Pi environment
Stars: ✭ 649 (+316.03%)
Mutual labels:  hacktoberfest, open-source, opensource
Hacktoberfest2020
beginner-friendly project to help you in open-source contributions. Made specifically for contributions in HACKTOBERFEST 2020! Hello World Programs in any language and C and Cpp program , Please leave a star ⭐ to support this project! ✨
Stars: ✭ 31 (-80.13%)
Mutual labels:  hacktoberfest, open-source, opensource
Cidram
CIDRAM: Classless Inter-Domain Routing Access Manager.
Stars: ✭ 86 (-44.87%)
Mutual labels:  hacktoberfest, open-source, opensource
Openitcockpit
openITCOCKPIT is an Open Source system monitoring tool built for different monitoring engines like Nagios, Naemon and Prometheus.
Stars: ✭ 108 (-30.77%)
Mutual labels:  hacktoberfest, open-source

fortune-mod Maintenance Version and Ongoing Development

Travis-CI Build Status

AppVeyor Build status

This GitHub repository maintains the sources for fortune-mod, a version of the UNIX fortune command. fortune is a command-line utility which displays a random quotation from a collection of quotes. This collection is read from the local file system and does not require network access. A large collection of quotes is provided in the download and installed by default, but more quote collections can be added by the user.

The canonical repository for the time being is: https://github.com/shlomif/fortune-mod . In the future, we may create a GitHub organization for it and move the sources there.

For more information about it, you can contact Shlomi Fish .

Installation

On Fedora and other rpm-based distributions:

sudo dnf install fortune-mod

On Arch Linux and derivatives:

sudo pacman -S fortune-mod

On Debian, and derivatives (e.g: Ubuntu, Linux Mint):

sudo apt install fortune-mod

(Warning: may be an old version.)

Release Tarballs

Release tarballs can be found at this directory for now.

Based on this reported bug:

One can find the official release tarballs of fortune-mod as prepared by CPack there. They have a proper containing directory. One can also download these tarballs from the GitHub releases page but please do not use the auto generated “Source code (zip)” and “Source code (tar.gz)” downloads which are both incomplete and have extra directories inside.

Sample usage

$ fortune
Enthusiasm is one of the most important
ingredients a volunteer project runs on.
                -- Andreas Schuldei
$

History

I believe fortune-mod was originally forked from the NetBSD version of fortune, and ported to run on Linux systems. For some time it was maintained at the currently offline redellipse-dot-net inside a GNU Arch (= an old and now mostly unused version control system) repository, and version 1.99.1 was released as a tarball.

This maintenance version was initiated by Shlomi Fish, who decided to maintain it out of being a fan of the fortune command. It started by importing the unpacked source of the fortune-mod-1.99.1.tar tarball from the Mageia Linux .src.rpm into an empty git repository and continuing from there.

What is the difference between fortune-mod and the "normal" fortune?

fortune-mod (= "fortune modified") was the name of a fork of the original NetBSD fortune, which was done in order to port the code to Linux and apply some other changes. If you are using a Linux distribution chances are that the fortune executable's package is fortune-mod (although in the case of Debian-and-derivatives it is likely very out-of-date as of September 2020).

Why is it written in C? Can't it be written in Perl, awk, Python, etc.?

The answer has several parts:

First of all note that according to the wikipedia page the original fortune was created in 1979, before the first version of perl was released in 1987, or python, ruby or Lua which were released later, and when UNIX-running computers were more underpowered than they are today.

Secondly, you can find some reimplementations of fortune here:

You may be able to get them to work with the data files of fortune-mod and other fortune collections, but note that we have not closely reviewed their source codes.

Thirdly, most of the value (and relative data size) of the tarball is in the quotes collection.

Fourthly, a native executable may still give a better user experience (I have yet to perform a stresstest benchmark though, and I doubt it will matter too much for fortune's common use case.)

Finally note that the runtime algorithm is not as straightforward as one may believe, making use of dat files that contain counts and offsets of the fortune "cookies".

What was already done.

  1. fortune-mod-1.99.1 was imported into the repository from the Mageia tarball as the tag fortune-mod-1.99.1.

  2. Converted the build system to CMake .

  3. Converted the source files to UTF-8.

  4. Added some tests.

  5. Removed trailing whitespace.

  6. Reformatted long (> 80 chars) lines.

  7. Fixed some typos.

  8. Added Travis-CI testing.

  9. Added valgrind tests and fixed some memory leaks.

  10. Released fortune-mod-1.99.3, fortune-mod-1.99.4, v2.0.0 and up to version 2.26.0

  11. Fixed some C compiler warnings encountered with the GCC compiler flags of Shlomif_Common.

  12. Added a build-time option to remove the “-o” (= “offensive”) flag, inspired by a set of patches on the Fedora package.

  13. Applied some downstream patches.

  14. Fixed as many “clang -Weverything” warnings as possible.

  15. lib-recode became maintained again at https://github.com/rrthomas/recode (thanks to @rrthomas ) thus preventing a switch to something else.

  16. Got the build and tests to pass on AppVeyor/MS Windows (with some appreciated help).

  17. Found and fixed some security issues:

  18. Reformatted the C code using clang-format.

What remains to be done.

  1. See if there are any more downstream patches to apply.

  2. Fix more typos (reports and pull-requests are welcome.)

  3. Perhaps modernize the code a little.

  4. Add more quotes / fortune cookies.

  5. Prepare packages for the new releases for downstream distributions/Operating Systems.

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].