Test cases / html

deft html to-text

Extract the readable text

1 run on real files, 2 tests on generated files, not shown. 0 failed.

Real-file tasks

Real files and a plain-language job, from the agent benchmark. These are the reference answers, not an agent run.

Text of a web pagePassed

Extract the readable text of article.html into article.txt.

deft html to-text article.html -o article.txt

Input

article.html 189.7 KB
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-menu-disabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available skin-thumbsize-clientpref-standard skin-underline-clientpref-browser" lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<title>Comma-separated values - Wikipedia</title>
<script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-menu-disabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available skin-thumbsize-clientpref-standard skin-underline-clientpref-browser";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"c4e4a283-755e-4684-80fc-bf3c7e803386","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Comma-separated_values","wgTitle":"Comma-separated values","wgCurRevisionId":1379342910,"wgRevisionId":1379342910,"wgArticleId":501906,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","Articles containing potentially dated statements from 2019","All articles containing potentially dated statements","Delimiter-separated formats","Open formats","Spreadsheet file formats"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Comma-separated_values","wgRelevantArticleId":501906,"wgTempUserName":null,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgFlaggedRevsParams":{"tags":{"status":{"levels":1}},"namespaces
… 190737 more characters

Output

article.txt 16.7 KB
Jump to content

Main menu

Main menu

move to sidebar hide

Navigation

- Main page
- Contents
- Current events
- Random article
- About Wikipedia
- Contact us

Contribute

- Help
- Learn to edit
- Community portal
- Recent changes
- Upload file
- Special pages

 Wikipedia The Free Encyclopedia

Search

Search

Appearance

- Donate
- Create account
- Log in

Personal tools

- Donate
- Create account
- Log in

Contents

move to sidebar hide

- (Top)
- 1 History
- 2 Specification
- 3 Applications
- 4 See also
- 5 References
- 6 Further reading

Toggle the table of contents

Comma-separated values

31 languages

- العربية
- Català
- Čeština
- Cymraeg
- Deutsch
- Esperanto
- Español
- Euskara
- فارسی
- Suomi
- Français
- עברית
- Bahasa Indonesia
- Italiano
- 日本語
- 한국어
- Lëtzebuergesch
- Lietuvių
- Nederlands
- Norsk bokmål
- Polski
- Português
- Русский
- Simple English
- Slovenčina
- Svenska
- தமிழ்
- ไทย
- Українська
- Vèneto
- 中文

Edit links

- Article
- Talk

English

- Read
- Edit
- View history

Tools

Tools

move to sidebar hide

Actions

- Read
- Edit
- View history

General

- What links here
- Related changes
- Upload file
- Permanent link
- Page information
- Cite this page
- Get shortened URL
- Switch to legacy parser

Print/export

- Download as PDF
- Printable version

In other projects

- Wikimedia Commons
- Wikidata item

Appearance

move to sidebar hide

From Wikipedia, the free encyclopedia

Text format

Comma-separated values

.csv
text/csv[1]
public.comma-separated-values-text[2]
public.delimited-values-text[2]
multi-platform, serial data streams
database information organized as field separated lists
RFC 4180

Comma-separated values (CSV) is a plain text data format for storing tabular data where the fields (values) of a record are separated by a comma as the delimiter and each record is a line (i.e. newline is the delimiter). CSV is commonly used in software that generally deals with tabular data such as a database or a spreadsheet.[3] Benefits cited for using CSV include simplicity of use and human readability.[4] CSV is a form of delimiter-separated values. A CSV file is a file that contains CSV-formatted data.

CSV is not limited to a particular character encoding[1] but should be and is commonly used with UTF-8, particularly because it does not provide a way to indicate the character encoding.

History

[edit]

The CSV format predates personal computers by more than a decade. The IBM Fortran (level H extended) compiler under OS/360 supported list-directed ("free-form") input/output, with commas between values, in 1972.[5] List-directed input/output was defined in FORTRAN 77, approved in 1978. List-directed input used commas or spaces for delimiters, so unquoted character strings could not contain commas or spaces.[6]

The term "comma-separated value" and the "CSV" abbreviation were in use by 1983.[7] The manual for the Osborne Executive computer, which bundled the SuperCalc spreadsheet, documents the CSV quoting convention 
… 13913 more characters
Automatic checks (1)
  • text: file = "article.txt", contains = ["Comma-separated values", "RFC 4180", "tabular data"], absent = ["<p>", "mw.config", "<script"]