Code Monkey home page Code Monkey logo

carl's Introduction

carl's People

Contributors

b1rger avatar dependabot[bot] avatar github-actions[bot] avatar

Stargazers

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

Watchers

 avatar

carl's Issues

Implement ncal features

  • -h Turns off highlighting of today.
  • -J Display Julian Calendar, if combined with the -o option, display date of Orthodox Easter according to the Julian Calendar.
  • -e Display date of Easter (for western churches).
  • -j Display Julian days (days one-based, numbered from January 1).
  • -m month Display the specified month. If month is specified as a decimal number, appending ‘f’ or ‘p’ displays the same month of the following or previous year respectively.
  • -o Display date of Orthodox Easter (Greek and Russian Orthodox Churches).
  • -p Print the country codes and switching days from Julian to Gregorian Calendar as they are assumed by ncal. The country code as determined from the local environment is marked with an asterisk.
  • -s country_code Assume the switch from Julian to Gregorian Calendar at the date associated with the country_code. If not specified, ncal tries to guess the switch date from the local environment or falls back to September 2, 1752. This was when Great Britain and her colonies switched to the Gregorian Calendar.
  • -w Print the number of the week below each week column.
  • -y Display a calendar for the specified year. This option is implied when a year but no month are specified on the command line.
  • -3 Display the previous, current and next month surrounding today.
  • -1 Display only the current month. This is the default.
  • -A number Months to add after. The specified number of months is added to the end of the display. This is in addition to any date range selected by the -y, -3, or -1 options. For example, “cal -y -B2 -A2” shows everything from November of the previous year to February of the following year. Negative numbers are allowed, in which case the specified number of months is subtracted. For example, “cal -y -B-6” shows July to December. And “cal -A11” simply shows the next 12 months.
  • -B number Months to add before. The specified number of months is added to the beginning of the display. See -A for examples.
  • -C Completely switch to cal mode. For cal like output only, use -b instead.
  • -d yyyy-mm Use yyyy-mm as the current date (for debugging of date selection).
  • -H yyyy-mm-dd Use yyyy-mm-dd as the current date (for debugging of highlighting).
  • -M Weeks start on Monday.
  • -S Weeks start on Sunday.
  • -W number First week of the year has at least number days.
  • -b Use oldstyle format for ncal output.

See also https://manpages.debian.org/bullseye/ncal/ncal.1.en.html

Look into `anstream`

Thats what clap is using for color output. Given that we are using clap we might just reuse that dependency. Downside is that anstream depends on rust version >= 1.64

RUSTSEC-2021-0145: Potential unaligned read

Potential unaligned read

Details
Status unsound
Package atty
Version 0.2.14
URL softprops/atty#50
Date 2021-07-04

On windows, atty dereferences a potentially unaligned pointer.

In practice however, the pointer won't be unaligned unless a custom global allocator is used.

In particular, the System allocator on windows uses HeapAlloc, which guarantees a large enough alignment.

atty is Unmaintained

A Pull Request with a fix has been provided over a year ago but the maintainer seems to be unreachable.

Last release of atty was almost 3 years ago.

Possible Alternative(s)

The below list has not been vetted in any way and may or may not contain alternatives;

See advisory page for additional details.

RUSTSEC-2021-0139: ansi_term is Unmaintained

ansi_term is Unmaintained

Details
Status unmaintained
Package ansi_term
Version 0.12.1
URL ogham/rust-ansi-term#72
Date 2021-08-18

The maintainer has advised that this crate is deprecated and will not receive any maintenance.

The crate does not seem to have much dependencies and may or may not be ok to use as-is.

Last release seems to have been three years ago.

Possible Alternative(s)

The below list has not been vetted in any way and may or may not contain alternatives;

Dependency Specific Migration(s)

See advisory page for additional details.

Cannot parse directory of .ics files or parse some types of events in ics files

I have config file loading .ics file working along with agenda working too.

I couldn't get directory mode of a bunch of .ics files to work, but have a basic birthday dates ICS file working fine by itself , so suspect some event types break parsing.
Testing directory mode with only that working ics file shows directory mode works fine as long as it can parse the ics files.

I'll can try to dig into which event types those are, of the 4 ics files I exported, only the simple birthday one works that has only 2 basic birthday events in it.

Probably related to: #32

Overall, a cool little utility that I'll probably use in my host MOTDs or login banner for interactive logins....IF I can find a way to sync my calendars out to ics files reliably...

Testing an unparsable ics file:

 RUST_BACKTRACE=all carl -y -a
thread 'main' panicked at 'not yet implemented', /home/peter/.cargo/registry/src/github.com-1ecc6299db9ec823/carl-0.1.0/src/events/mod.rs:71:39
stack backtrace:
   0: rust_begin_unwind
             at /build/rustc-ujz1Py/rustc-1.66.1+dfsg0ubuntu1/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /build/rustc-ujz1Py/rustc-1.66.1+dfsg0ubuntu1/library/core/src/panicking.rs:65:14
   2: core::panicking::panic
             at /build/rustc-ujz1Py/rustc-1.66.1+dfsg0ubuntu1/library/core/src/panicking.rs:115:5
   3: carl::events::Event::in_range
   4: alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter
   5: carl::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Files were exported with Gmail export, but I can dig deeper into which event types break it if you want, or hold off if you're already aware of the parsing issue.

RUSTSEC-2020-0071: Potential segfault in the time crate

Potential segfault in the time crate

Details
Package time
Version 0.1.45
URL time-rs/time#293
Date 2020-11-18
Patched versions >=0.2.23
Unaffected versions =0.2.0,=0.2.1,=0.2.2,=0.2.3,=0.2.4,=0.2.5,=0.2.6

Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

The affected functions from time 0.2.7 through 0.2.22 are:

  • time::UtcOffset::local_offset_at
  • time::UtcOffset::try_local_offset_at
  • time::UtcOffset::current_local_offset
  • time::UtcOffset::try_current_local_offset
  • time::OffsetDateTime::now_local
  • time::OffsetDateTime::try_now_local

The affected functions in time 0.1 (all versions) are:

  • at
  • at_utc
  • now

Non-Unix targets (including Windows and wasm) are unaffected.

Patches

Pending a proper fix, the internal method that determines the local offset has been modified to always return None on the affected operating systems. This has the effect of returning an Err on the try_* methods and UTC on the non-try_* methods.

Users and library authors with time in their dependency tree should perform cargo update, which will pull in the updated, unaffected code.

Users of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3 series.

Workarounds

A possible workaround for crates affected through the transitive dependency in chrono, is to avoid using the default oldtime feature dependency of the chrono crate by disabling its default-features and manually specifying the required features instead.

Examples:

Cargo.toml:

chrono = { version = &quot;0.4&quot;, default-features = false, features = [&quot;serde&quot;] }
chrono = { version = &quot;0.4.22&quot;, default-features = false, features = [&quot;clock&quot;] }

Commandline:

cargo add chrono --no-default-features -F clock

Sources:

See advisory page for additional details.

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.