Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
335 changes: 335 additions & 0 deletions docs/assets/css/docs/article.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
#article {
padding: 8px 16px;
}

#article-header {
font-size: 3em;
font-weight: 400;
margin-bottom: 1em;
color: var(--color2)
}

#article-content h1,
#article-content h2,
#article-content h3,
#article-content h4,
#article-content h5,
#article-content h6 {
line-height: 1em;
font-weight: 400;
margin: 2.6em 0 .1em;
color: var(--color2)
}

#article-content h1 {
font-size: 1.8em
}

#article-content h2 {
font-size: 1.5em
}

#article-content h3 {
font-size: 1.3em
}

#article-content h4 {
font-size: 1.1em
}

#article-content .highlight,
#article-content blockquote,
#article-content dl,
#article-content iframe,
#article-content ol,
#article-content p,
#article-content table,
#article-content ul {
margin-top: 1em;
line-height: 1.8rem;
letter-spacing: -.1px;
}

#article-content blockquote p {
margin: 1em 0
}

#article-content blockquote dl,
#article-content blockquote ol,
#article-content blockquote ul {
margin: 0 1em 1em 1em
}

#article-content a {
color: var(--color-anchor);
text-decoration: none
}

#article-content a:hover {
color: var(--color-hover);
text-decoration: underline
}

@media print {
#article-content a {
color: #355265;
text-decoration: underline
}

#article-content a:after {
content: " (" attr(href) ")";
font-size: 80%
}
}

#article-content strong, #article-content b, #article-content table th {
font-weight: 600
}

#article-content em {
font-style: italic
}

#article-content dl,
#article-content ol,
#article-content ul {
margin-left: 20px
}

#article-content dl dl,
#article-content dl ol,
#article-content dl ul,
#article-content ol dl,
#article-content ol ol,
#article-content ol ul,
#article-content ul dl,
#article-content ul ol,
#article-content ul ul {
margin-top: 0;
margin-bottom: 0
}

#article-content ul {
list-style: disc
}

#article-content ol {
list-style: decimal
}

#article-content dl {
list-style: square
}

#article-content li > ul {
list-style: circle
}

#article-content li > ol {
list-style: lower-alpha
}

#article-content li p {
margin: 0
}

#article-content li .highlight,
#article-content li blockquote,
#article-content li iframe,
#article-content li table {
margin: 1em 0
}

#article-content img,
#article-content video {
max-width: 100%;
border-radius: 4px
}

#article-content blockquote {
padding: 8px 12px;
position: relative;
background: var(--background-fg);
border-left: 4px solid var(--border-color);
border-radius: 6px;
}

#article-content blockquote footer {
margin: 1em 0;
font-style: italic
}

#article-content blockquote footer cite:before {
content: "—";
padding: 0 .3em
}

#article-content blockquote footer cite a {
color: var(--border-color);
}

#article-content code, #article-content pre {
font-family: var(--font-family-code);
}

#article-content h1 code,
#article-content h2 code,
#article-content h3 code,
#article-content h4 code,
#article-content h5 code,
#article-content h6 code,
#article-content p code,
#article-content blockquote code,
#article-content ul code,
#article-content ol code,
#article-content dl code,
#article-content table code {
background: var(--chroma-base01);
padding: 4px;
border-radius: 4px;
font-size: .9em;
}

#article-content pre:not(.chroma) {
color: var(--chroma-base05);
font-size: .9em;
line-height: 1.8;
letter-spacing: -.1px;
background-color: var(--chroma-base00);
border-radius: 6px;
padding: 16px 24px;
overflow-x: auto;
margin-top: 1em;
}

#article-content blockquote code {
background: var(--background-fg2);
opacity: .8;
}

#article-content blockquote .chroma, #article-content blockquote pre:not(.chroma) {
background: var(--background-fg2);
margin-bottom: 1em;
}

#article-content blockquote .chroma code, #article-content blockquote pre:not(.chroma) code {
padding: 0;
}

#article-content table {
max-width: 100%;
border: 1px solid var(--border-color)
}

#article-content table td,
#article-content table th {
padding: 5px 15px
}

#article-content table tr:nth-child(2n) {
background: var(--background-fg)
}

#article-footer {
display: grid;
grid-template-columns: 1fr 1fr;
padding-top: 20px;
}

#article-last-updated, #article-prev-link, #article-next-link {
display: flex;
align-items: center;
padding: 12px 0;
}

#article-last-updated {
grid-column: 1 / 3;
justify-content: center;
color: var(--color3);
}

#article-prev-link, #article-next-link {
color: var(--color-anchor);
}

#article-prev-link:hover, #article-next-link:hover {
color: var(--color-hover);
font-weight: 600;
font-size: 98%;
}

#article-next-link {
justify-content: flex-end;
}

#article-prev-link .icon {
padding-right: 6px;
}

#article-next-link .icon {
padding-left: 6px;
}

@media (max-width: 767px) {
#article-next-link[data-first-page="true"] {
grid-column: 2/ 3;
}
}

@media (min-width: 768px) {
#article {
padding: 16px 24px;
}

#article-footer {
display: grid;
grid-template-columns: repeat(3, 1fr);
}

#article-prev-link {
grid-column: 1/ 2;
grid-row: 1;
}

#article-last-updated {
grid-column: 2 / 3;
}

#article-next-link {
grid-column: 3 / 4;
}
}

@media (min-width: 1024px) {
#article {
padding: 24px 32px;
}
}

@media (min-width: 1281px) {
#article {
padding: 32px 40px;
}
}

@media (min-width: 1920px) {
#article {
padding: 40px 48px;
}

#article-content {
width: 90%;
}
}

@media (min-width: 2560px) {
#article-content {
width: 85%;
}
}

@media (min-width: 3840px) {
#article-content {
width: 80%;
}
}
36 changes: 36 additions & 0 deletions docs/content/en/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- $foo
env: # you can pass env variables
foo: bar
encoding: utf-8 # specify output encoding if job produces non-UTF-8 text
other_workingdir:
command: pwd
working_directory: ../testdata # specify the working directory of the job
Expand All @@ -38,6 +39,9 @@ jobs:
- https://webhook.site/048ff47f-9ef5-43fb-9375-a795a8c5cbf5
notify_discord_webhook: # notify discord via a discord compatible webhook
- https://discord.com/api/webhooks/user/token
legacy_system:
command: legacy-app.exe
encoding: windows-1252 # handle Windows-specific encoding for legacy applications
```

## Configuration Options
Expand All @@ -46,10 +50,42 @@ All configuration options are available by checking out `cheek --help` or the he

Configuration can be passed as flags to the `cheek` CLI directly. All configuration flags are also possible to set via environment variables. The following environment variables are available, they will override the default and/or set value of their similarly named CLI flags (without the prefix): `CHEEK_PORT`, `CHEEK_SUPPRESSLOGS`, `CHEEK_LOGLEVEL`, `CHEEK_PRETTY`, `CHEEK_HOMEDIR`.

## Output Encoding

By default, cheek expects job output to be UTF-8 encoded. If your jobs produce output in a different encoding, unsupported characters may display as fallback Unicode "tofu" characters (□) or become corrupted. This problem most commonly occurs on Windows systems, legacy applications, or when working with applications that output text in regional character encodings such as Chinese, Japanese, or Korean.

To handle non-UTF-8 output correctly, you can specify the `encoding` parameter at the job level to tell cheek how to properly decode the job's output.

### Supported Encodings

cheek supports the following output encodings:

**UTF-8 Compatible** (no transformation needed):
- `utf-8`, `utf8` - UTF-8 Unicode encoding (default)
- `ascii` - ASCII encoding

**Chinese Encodings**:
- `gbk`, `gb2312`, `cp936` - Simplified Chinese (GBK)
- `gb18030` - Extended Chinese encoding standard
- `big5` - Traditional Chinese

**Japanese Encodings**:
- `shift-jis`, `shiftjis`, `sjis` - Shift JIS encoding
- `euc-jp` - Extended Unix Code for Japanese

**Korean Encodings**:
- `euc-kr` - Extended Unix Code for Korean

**Western Encodings**:
- `iso-8859-1`, `latin1` - Western European (Latin-1)
- `windows-1252`, `cp1252` - Windows Western European

## Important Notes

- If your `command` requires arguments, please make sure to pass them as an array like in the `bar` job example above
- You can set `tz_location` if the system time of where you run your service is not to your liking
- The `encoding` parameter is specified per job, allowing different jobs in the same schedule to use different encodings
- If you see garbled characters or □ symbols in job output, consider setting the appropriate `encoding` parameter
- The configuration structure should be self-explanatory, but if it's not, please create an [issue](https://github.com/bart6114/cheek/issues)

## Running cheek
Expand Down
Loading